EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.metadata
Interface MetadataSource

All Known Implementing Classes:
MetadataSourceAdapter, XMLMetadataSource

public interface MetadataSource

Purpose: Interface used to support additional persistence unit metadata being provided from outside of what was packaged within the application. A MetadataSource will need to be registered with a persistence unit.

See Also:
PersistenceUnitProperties.METADATA_SOURCE
Author:
cdelahunt, dclarke
Since:
EclipseLink 2.3.0

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)
          PUBLIC: This method is responsible for returning the object representation of the object-relational mapping overrides.
 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.
 

Method Detail

getPropertyOverrides

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. It is called on initial deployment of the persistence unit and when the persistence unit is reloaded to allow customization of the persistence unit above and beyond what is packaged in the persistence.xml and what is code into the application.

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.

Since:
EclipseLink 2.4

getEntityMappings

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)
PUBLIC: This method is responsible for returning the object representation of the object-relational mapping overrides. It is called on initial deployment of the persistence unit and when the persistence unit is reloaded to allow customization of the persistence unit above and beyond what is packaged in the persistence.xml and what is code into the application. IMPORTANT: This method is called during the predeploy stage that is used both for weaving and runtime EMF deployment. Runtime properties might not be available during weaving, and mapping options that require weaving changes should not be used. For example adding a lazy OneToOne mapping after weaving has already occurred will result in an exception if they are expected to have been woven into the class.


EclipseLink 2.4.2, build 'v20130514-5956486' API Reference