
public final class PersistenceXmlUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PERSISTENCE_NS_URI
URI for the JPA persistence namespace
|
static String |
PERSISTENCE_XML
The persistence XML location
|
static String |
PERSISTENCE_XML_BASE_NAME |
static String |
PERSISTENCE_XML_ROOT
The persistence xml root
|
static String |
PERSISTENCE_XSD_DIR
The persistence XSD location
|
| Modifier and Type | Method and Description |
|---|---|
static javax.persistence.spi.PersistenceUnitInfo |
findPersistenceUnit(String unitName,
Collection<? extends javax.persistence.spi.PersistenceUnitInfo> units)
Parse the persistence.xml files referenced by the URLs in the collection
|
static Collection<? extends javax.persistence.spi.PersistenceUnitInfo> |
getPersistenceUnits(InputStream is,
URL xmlRoot,
JPAVersion version) |
static Schema |
getSchema(JPAVersion version) |
static JPAVersion |
getSchemaVersion(InputStream is) |
protected static <T extends DefaultHandler> |
parse(InputStream is,
T handler) |
static Collection<? extends javax.persistence.spi.PersistenceUnitInfo> |
parse(URL persistenceXml)
Parse the persistence.xml files referenced by the URLs in the collection
|
static String |
parseSchemaVersion(String uri,
PersistenceXml element,
Attributes attributes) |
public static final String PERSISTENCE_NS_URI
public static final String PERSISTENCE_XML_ROOT
public static final String PERSISTENCE_XML_BASE_NAME
public static final String PERSISTENCE_XSD_DIR
public static final String PERSISTENCE_XML
public static javax.persistence.spi.PersistenceUnitInfo findPersistenceUnit(String unitName, Collection<? extends javax.persistence.spi.PersistenceUnitInfo> units)
persistenceXml - public static Collection<? extends javax.persistence.spi.PersistenceUnitInfo> parse(URL persistenceXml)
persistenceXml - IOExceptionSAXExceptionParserConfigurationExceptionpublic static Schema getSchema(JPAVersion version) throws SAXException
SAXExceptionpublic static JPAVersion getSchemaVersion(InputStream is) throws ParserConfigurationException, SAXException, IOException
public static Collection<? extends javax.persistence.spi.PersistenceUnitInfo> getPersistenceUnits(InputStream is, URL xmlRoot, JPAVersion version) throws ParserConfigurationException, SAXException, IOException
protected static <T extends DefaultHandler> T parse(InputStream is, T handler) throws ParserConfigurationException, SAXException, IOException
is - - xml file to be validatedhandler - ParserConfigurationExceptionSAXExceptionIOExceptionpublic static String parseSchemaVersion(String uri, PersistenceXml element, Attributes attributes) throws SAXException
uri - element - attributes - SAXExceptionCopyright © 2009–2025 OrientDB. All rights reserved.