java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor

public class MetadataProcessor extends Object
INTERNAL: The object/relational metadata processor for the EJB3.0 specification.
Since:
TopLink EJB 3.0 Reference Implementation
  • Field Details

  • 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

      public void addCompositeMemberProcessor(MetadataProcessor compositeMemberProcessor)
      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

      public MetadataProcessor getCompositeProcessor()
      INTERNAL: Return compositeProcessor.
    • getMetadataFactory

      public MetadataFactory getMetadataFactory()
      INTERNAL:
    • getMetadataSource

      public MetadataSource getMetadataSource()
      INTERNAL:
    • getPearProjects

      public Set<MetadataProject> getPearProjects(MetadataProject project)
      INTERNAL: Returns projects owned by compositeProcessor minus the passed project.
    • getPersistenceUnitClassSetFromMappingFiles

      public Set<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.
    • getProject

      public MetadataProject 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

      protected void handleORMException(RuntimeException e, String mappingFile, boolean throwException)
      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

      protected void loadStandardMappingFiles(String ormXMLFile)
      INTERNAL:
    • getSessionLog

      protected SessionLog 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

      public void processEntityMappings(PersistenceUnitProcessor.Mode mode)
      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

      public void processORMMetadata(PersistenceUnitProcessor.Mode mode)
      INTERNAL: Process the ORM metadata on this processors metadata project (representing a single persistence-unit)
    • setClassLoader

      public void setClassLoader(ClassLoader loader)
      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

      public void setMetadataSource(MetadataSource source)
      INTERNAL: Use this method to set the MetadataSource class to use for loading extensible mappings