public class MetadataProcessor
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<MetadataProcessor> |
m_compositeMemberProcessors |
protected MetadataProcessor |
m_compositeProcessor |
protected MetadataFactory |
m_factory |
protected java.lang.ClassLoader |
m_loader |
protected MetadataSource |
m_metadataSource |
protected java.util.Map |
m_predeployProperties |
protected MetadataProject |
m_project |
protected AbstractSession |
m_session |
| Constructor and Description |
|---|
MetadataProcessor()
INTERNAL:
Empty processor to be used as a composite processor.
|
MetadataProcessor(PersistenceUnitInfo puInfo,
AbstractSession session,
java.lang.ClassLoader loader,
boolean weaveLazy,
boolean weaveEager,
boolean weaveFetchGroups,
boolean multitenantSharedEmf,
boolean multitenantSharedCache,
java.util.Map predeployProperties,
MetadataProcessor compositeProcessor)
INTERNAL:
Called from EntityManagerSetupImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCompositeMemberProcessor(MetadataProcessor compositeMemberProcessor)
INTERNAL:
Add containedProcessor to compositeProcessor.
|
void |
addEntityListeners()
INTERNAL:
Method to place EntityListener's on the descriptors from the given
session.
|
void |
addNamedQueries()
INTERNAL:
Method to place NamedQueries and NamedNativeQueries on the given session.
|
void |
addStructConverterNames()
INTERNAL:
Adds a list of StructConverter string names that were defined in the
metadata of this project to the native EclipseLink project.
|
void |
createDynamicClasses()
INTERNAL:
During EntityManagerSetup deploy, using the real class loader we must
create our dynamic classes.
|
void |
createRestInterfaces() |
MetadataProcessor |
getCompositeProcessor()
INTERNAL:
Return compositeProcessor.
|
MetadataFactory |
getMetadataFactory()
INTERNAL:
|
MetadataSource |
getMetadataSource()
INTERNAL:
|
java.util.Set<MetadataProject> |
getPearProjects(MetadataProject project)
INTERNAL:
Returns projects owned by compositeProcessor minus the passed project.
|
java.util.Set<java.lang.String> |
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.
|
MetadataProject |
getProject()
INTERNAL:
|
protected SessionLog |
getSessionLog()
INTERNAL:
Return the SessionLog from the Session.
|
protected void |
handleORMException(java.lang.RuntimeException e,
java.lang.String mappingFile,
boolean throwException)
INTERNAL:
Handle an exception that occurred while processing ORM xml.
|
protected void |
initPersistenceUnitClasses()
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(java.lang.String ormXMLFile)
INTERNAL:
|
void |
processCustomizers()
INTERNAL:
Process the customizer for those entities and embeddables that have one
defined.
|
void |
processEntityMappings(PersistenceUnitProcessor.Mode mode)
INTERNAL:
Performs the initialization of the persistence unit classes and then
processes the xml metadata.
|
void |
processORMMetadata(PersistenceUnitProcessor.Mode mode)
INTERNAL:
Process the ORM metadata on this processors metadata project
(representing a single persistence-unit)
|
void |
setClassLoader(java.lang.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
|
protected java.lang.ClassLoader m_loader
protected MetadataFactory m_factory
protected MetadataProject m_project
protected AbstractSession m_session
protected java.util.Map m_predeployProperties
protected MetadataProcessor m_compositeProcessor
protected java.util.Set<MetadataProcessor> m_compositeMemberProcessors
protected MetadataSource m_metadataSource
public MetadataProcessor()
public MetadataProcessor(PersistenceUnitInfo puInfo,
AbstractSession session,
java.lang.ClassLoader loader,
boolean weaveLazy,
boolean weaveEager,
boolean weaveFetchGroups,
boolean multitenantSharedEmf,
boolean multitenantSharedCache,
java.util.Map predeployProperties,
MetadataProcessor compositeProcessor)
public void addCompositeMemberProcessor(MetadataProcessor compositeMemberProcessor)
public void addEntityListeners()
public void addNamedQueries()
public void createDynamicClasses()
public void createRestInterfaces()
public MetadataProcessor getCompositeProcessor()
public MetadataFactory getMetadataFactory()
public MetadataSource getMetadataSource()
public java.util.Set<MetadataProject> getPearProjects(MetadataProject project)
public java.util.Set<java.lang.String> getPersistenceUnitClassSetFromMappingFiles()
public MetadataProject getProject()
public void addStructConverterNames()
protected void handleORMException(java.lang.RuntimeException e,
java.lang.String mappingFile,
boolean throwException)
protected void initPersistenceUnitClasses()
public void loadMappingFiles(boolean throwExceptionOnFail)
protected void loadSpecifiedMappingFiles(boolean throwExceptionOnFail)
protected void loadStandardMappingFiles(java.lang.String ormXMLFile)
protected SessionLog getSessionLog()
public void processCustomizers()
public void processEntityMappings(PersistenceUnitProcessor.Mode mode)
public void processORMMetadata(PersistenceUnitProcessor.Mode mode)
public void setClassLoader(java.lang.ClassLoader loader)
public void setMetadataSource(MetadataSource source)