Module org.eclipse.persistence.jpa
Class MetadataProcessor
java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor
INTERNAL:
The object/relational metadata processor for the EJB3.0 specification.
- Since:
- TopLink EJB 3.0 Reference Implementation
-
Field Summary
Modifier and TypeFieldDescriptionprotected Set
<MetadataProcessor> protected MetadataProcessor
protected MetadataFactory
protected ClassLoader
protected MetadataSource
protected MetadataProject
protected AbstractSession
-
Constructor Summary
ConstructorDescriptionINTERNAL: Empty processor to be used as a composite processor.MetadataProcessor
(PersistenceUnitInfo puInfo, AbstractSession session, ClassLoader loader, boolean weaveLazy, boolean weaveEager, boolean weaveFetchGroups, boolean multitenantSharedEmf, boolean multitenantSharedCache, Map<String, Object> predeployProperties, MetadataProcessor compositeProcessor) INTERNAL: Called from EntityManagerSetupImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompositeMemberProcessor
(MetadataProcessor compositeMemberProcessor) INTERNAL: Add containedProcessor to compositeProcessor.void
INTERNAL: Method to place EntityListener's on the descriptors from the given session.void
INTERNAL: Method to place NamedQueries and NamedNativeQueries on the given session.void
INTERNAL: Adds a list of StructConverter string names that were defined in the metadata of this project to the native EclipseLink project.void
INTERNAL: During EntityManagerSetup deploy, using the real class loader we must create our dynamic classes.INTERNAL: Return compositeProcessor.INTERNAL:INTERNAL:getPearProjects
(MetadataProject project) INTERNAL: Returns projects owned by compositeProcessor minus the passed project.INTERNAL: Return a set of class names for each entity, embeddable and mapped superclass found in the mapping files to be processed by the MetadataProcessor.INTERNAL:protected SessionLog
INTERNAL: Return the SessionLog from the Session.protected void
handleORMException
(RuntimeException e, String mappingFile, boolean throwException) INTERNAL: Handle an exception that occurred while processing ORM xml.protected void
INTERNAL: This method is responsible for discovering all the entity classes for this PU and adding corresponding MetadataDescriptor in the MetadataProject.void
loadMappingFiles
(boolean throwExceptionOnFail) INTERNAL: This method is responsible for figuring out list of mapping files to read into XMLEntityMappings objects and store on the project.protected void
loadSpecifiedMappingFiles
(boolean throwExceptionOnFail) INTERNAL:protected void
loadStandardMappingFiles
(String ormXMLFile) INTERNAL:void
INTERNAL: Process the customizer for those entities and embeddables that have one defined.void
INTERNAL: Performs the initialization of the persistence unit classes and then processes the xml metadata.void
INTERNAL: Process the ORM metadata on this processors metadata project (representing a single persistence-unit)void
setClassLoader
(ClassLoader loader) INTERNAL: Use this method to set the correct class loader that should be used during processing.void
setMetadataSource
(MetadataSource source) INTERNAL: Use this method to set the MetadataSource class to use for loading extensible mappings
-
Field Details
-
m_loader
-
m_factory
-
m_project
-
m_session
-
m_predeployProperties
-
m_compositeProcessor
-
m_compositeMemberProcessors
-
m_metadataSource
-
-
Constructor Details
-
MetadataProcessor
public MetadataProcessor()INTERNAL: Empty processor to be used as a composite processor. -
MetadataProcessor
public MetadataProcessor(PersistenceUnitInfo puInfo, AbstractSession session, ClassLoader loader, boolean weaveLazy, boolean weaveEager, boolean weaveFetchGroups, boolean multitenantSharedEmf, boolean multitenantSharedCache, Map<String, Object> predeployProperties, MetadataProcessor compositeProcessor) INTERNAL: Called from EntityManagerSetupImpl. The 'real' EJB 3.0 processing that includes XML and annotations.
-
-
Method Details
-
addCompositeMemberProcessor
INTERNAL: Add containedProcessor to compositeProcessor. -
addEntityListeners
public void addEntityListeners()INTERNAL: Method to place EntityListener's on the descriptors from the given session. This call is made from the EntityManagerSetup deploy call. -
addNamedQueries
public void addNamedQueries()INTERNAL: Method to place NamedQueries and NamedNativeQueries on the given session. This call is made from the EntityManagerSetup deploy call. -
createDynamicClasses
public void createDynamicClasses()INTERNAL: During EntityManagerSetup deploy, using the real class loader we must create our dynamic classes. -
getCompositeProcessor
INTERNAL: Return compositeProcessor. -
getMetadataFactory
INTERNAL: -
getMetadataSource
INTERNAL: -
getPearProjects
INTERNAL: Returns projects owned by compositeProcessor minus the passed project. -
getPersistenceUnitClassSetFromMappingFiles
INTERNAL: Return a set of class names for each entity, embeddable and mapped superclass found in the mapping files to be processed by the MetadataProcessor. -
getProject
INTERNAL: -
addStructConverterNames
public void addStructConverterNames()INTERNAL: Adds a list of StructConverter string names that were defined in the metadata of this project to the native EclipseLink project. These StructConverters can be added to the Project to be processed later -
handleORMException
INTERNAL: Handle an exception that occurred while processing ORM xml. -
initPersistenceUnitClasses
protected void initPersistenceUnitClasses()INTERNAL: This method is responsible for discovering all the entity classes for this PU and adding corresponding MetadataDescriptor in the MetadataProject. This method will also gather all the weavable classes for this PU. Currently, entity and embeddable classes are weavable. NOTE: The order of processing should not be changed as the steps are dependent on one another. -
loadMappingFiles
public void loadMappingFiles(boolean throwExceptionOnFail) INTERNAL: This method is responsible for figuring out list of mapping files to read into XMLEntityMappings objects and store on the project. Note, the order the files are discovered and read is very important so do not change the order of invocation. -
loadSpecifiedMappingFiles
protected void loadSpecifiedMappingFiles(boolean throwExceptionOnFail) INTERNAL: -
loadStandardMappingFiles
INTERNAL: -
getSessionLog
INTERNAL: Return the SessionLog from the Session. If the session is null, return the AbstractSessionLog's SessionLog.- Returns:
- SessionLog
-
processCustomizers
public void processCustomizers()INTERNAL: Process the customizer for those entities and embeddables that have one defined. This must be the last thing called on this processor before cleanup. -
processEntityMappings
INTERNAL: Performs the initialization of the persistence unit classes and then processes the xml metadata. Note: Do not change the order of invocation of various methods. -
processORMMetadata
INTERNAL: Process the ORM metadata on this processors metadata project (representing a single persistence-unit) -
setClassLoader
INTERNAL: Use this method to set the correct class loader that should be used during processing. Currently, the class loader should only change once, from preDeploy to deploy. -
setMetadataSource
INTERNAL: Use this method to set the MetadataSource class to use for loading extensible mappings
-