|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.metadata.MetadataSourceAdapter org.eclipse.persistence.jpa.metadata.XMLMetadataSource
public class XMLMetadataSource
Purpose: Support reading metadata for a persistence unit in an XML format from a URL and if the property is undefined, it will look for a file.
Constructor Summary | |
---|---|
XMLMetadataSource()
|
Method Summary | |
---|---|
org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings |
getEntityMappings(java.util.Map<java.lang.String,java.lang.Object> properties,
java.lang.ClassLoader classLoader,
SessionLog log)
This method is responsible for returning the object representation of the MetadataSource. |
java.io.Reader |
getEntityMappingsReader(java.util.Map<java.lang.String,java.lang.Object> properties,
java.lang.ClassLoader classLoader,
SessionLog log)
This method returns a Reader for an EclipseLink-ORM.xml. |
protected static java.net.URL |
getFileURL(java.lang.String fileName,
java.lang.ClassLoader classLoader,
SessionLog log)
|
java.util.Map<java.lang.String,java.lang.Object> |
getPropertyOverrides(java.util.Map<java.lang.String,java.lang.Object> properties,
java.lang.ClassLoader classLoader,
SessionLog log)
PUBLIC: This method is responsible for returning additional persistence unit property overrides. |
java.lang.String |
getRepositoryName()
Used by getEntityMappings when creating the XMLEntityMappings as a way of describing where it was read from. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLMetadataSource()
Method Detail |
---|
public java.io.Reader getEntityMappingsReader(java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.ClassLoader classLoader, SessionLog log)
properties
- classLoader
- log
- - SessionLog used for status messages.
getEntityMappings
public org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings getEntityMappings(java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.ClassLoader classLoader, SessionLog log)
getEntityMappings
in interface MetadataSource
getEntityMappings
in class MetadataSourceAdapter
public java.lang.String getRepositoryName()
public java.util.Map<java.lang.String,java.lang.Object> getPropertyOverrides(java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.ClassLoader classLoader, SessionLog log)
IMPORTANT: Although any property can be changed using this approach it is important that users of this feature ensure compatible configurations are supplied. As an example; overriding an application to use RESOURCE_LOCAL when it was coded to use JTA would result in changes not be written to the database. PersistenceUnitProperties.METADATA_SOURCE_PROPERTIES_FILE property will be used to get a file resource from the classloader. Properties are read from the file. If the property either not specified or contains an empty string then returns null.
protected static java.net.URL getFileURL(java.lang.String fileName, java.lang.ClassLoader classLoader, SessionLog log) throws java.io.IOException
java.io.IOException
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |