public class MetadataProcessor extends Object
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
m_loader |
protected MetadataLogger |
m_logger |
protected MetadataProject |
m_project |
protected AbstractSession |
m_session |
protected MetadataValidator |
m_validator |
Constructor and Description |
---|
MetadataProcessor(AbstractSession session,
ClassLoader loader,
Collection<Class> entities,
boolean enableLazyForOneToOne)
Deprecated.
|
MetadataProcessor(PersistenceUnitInfo puInfo,
AbstractSession session,
ClassLoader loader,
boolean enableLazyForOneToOne)
INTERNAL:
Called from EntityManagerSetupImpl.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Set<String> |
buildEntityClassSetFromXMLDocuments()
INTERNAL:
Return a set of class names for each entity found in the
list of xml descriptor instance documents to be processed by the
MetadataProcessor.
|
void |
buildEntityList()
This method is responsible for discovering all the entity classes
for this PU and adding corresponding MetadataDescriptor in the
MetadataProject.
|
void |
cleanup()
This method frees up resources acquired by this object.
|
MetadataLogger |
getLogger()
INTERNAL:
Return the logger used by the processor.
|
MetadataProject |
getProject()
INTERNAL:
|
MetadataValidator |
getValidator()
INTERNAL:
Return the validator used by the processor.
|
void |
processAnnotations()
INTERNAL:
Called from RelationshipWeaverTestSuite which uses only annotations
and no XML.
|
void |
processMappingFiles()
INTERNAL:
Process metadata found in all the mapping files for this PU.
|
void |
processPersistenceUnitMetadata()
INTERNAL:
Process persistence unit metadata and defaults, and apply them to each
entity in the collection.
|
void |
readMappingFiles(boolean throwExceptionOnFail)
This method is responsible for figuring out list of mapping files
to be read for a persistence unit and storing that list in
MetadataProject . |
void |
setClassLoader(ClassLoader loader)
INTERNAL:
Use this method to set the correct class loader that should be used
during processing.
|
protected ClassLoader m_loader
protected MetadataLogger m_logger
protected MetadataProject m_project
protected MetadataValidator m_validator
protected AbstractSession m_session
public MetadataProcessor(PersistenceUnitInfo puInfo, AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne)
public MetadataProcessor(AbstractSession session, ClassLoader loader, Collection<Class> entities, boolean enableLazyForOneToOne)
public void addEntityListeners()
public void addNamedQueries()
public MetadataLogger getLogger()
public MetadataProject getProject()
public MetadataValidator getValidator()
public void processAnnotations()
public void processPersistenceUnitMetadata()
public void setClassLoader(ClassLoader loader)
public void readMappingFiles(boolean throwExceptionOnFail)
MetadataProject
.throwExceptionOnFail
- public void buildEntityList()
public Set<String> buildEntityClassSetFromXMLDocuments()
public void processMappingFiles()
public void cleanup()
Copyright © 2022. All rights reserved.