org.datanucleus.jpa.metadata
Class JPAMetaDataManager

java.lang.Object
  extended by org.datanucleus.metadata.MetaDataManager
      extended by org.datanucleus.jpa.metadata.JPAMetaDataManager

public class JPAMetaDataManager
extends org.datanucleus.metadata.MetaDataManager

Manager of JPA MetaData information in DataNucleus. Manages the MetaData for a particular "persistence-unit".


Field Summary
protected  java.util.List listeners
          EventListeners.
 
Fields inherited from class org.datanucleus.metadata.MetaDataManager
allowMetaDataLoad, annotationManager, classesWithoutPersistenceInfo, classMetaDataByAppIdClassName, classMetaDataByClass, classMetaDataByDiscriminatorName, classMetaDataByEntityName, directSubclassesByClass, fetchPlanMetaDataByName, fileMetaDataByURLString, LOCALISER, metaDataParser, omfContext, queryMetaDataByName, queryResultMetaDataByName, sequenceMetaDataByPackageSequence, supportsORM, tableGeneratorMetaDataByPackageSequence, userMetaDataNumber, utilisedFileMetaData, validateMetaData
 
Constructor Summary
JPAMetaDataManager(org.datanucleus.OMFContext ctxt)
          Constructor.
 
Method Summary
 java.util.List getListeners()
          Get the event listeners
 org.datanucleus.metadata.AbstractClassMetaData getMetaDataForClassInternal(java.lang.Class c, org.datanucleus.ClassLoaderResolver clr)
          Accessor for the JPA MetaData for a class.
protected  org.datanucleus.metadata.FileMetaData parseFile(java.net.URL fileURL)
          Utility to parse a file, using the "jpa" MetaData handler.
 void registerFile(java.lang.String fileURLString, org.datanucleus.metadata.FileMetaData filemd, org.datanucleus.ClassLoaderResolver clr)
          Method to take the FileMetaData and register the relevant parts of it with the various convenience collections/maps that we use for access.
 
Methods inherited from class org.datanucleus.metadata.MetaDataManager
addORMDataToClass, close, deregisterListener, getAllowMetaDataLoad, getApiAdapter, getClassesImplementingInterface, getClassesWithMetaData, getClassMetaDataForImplementationOfPersistentInterface, getClassMetaDataWithApplicationId, getFileMetaData, getImplementationNameForPersistentInterface, getMetaDataForClass, getMetaDataForClass, getMetaDataForDiscriminator, getMetaDataForEntityName, getMetaDataForFetchPlan, getMetaDataForImplementationOfReference, getMetaDataForInterface, getMetaDataForMember, getMetaDataForMember, getMetaDataForPersistenceUnit, getMetaDataForQuery, getMetaDataForQueryResult, getMetaDataForSequence, getMetaDataForTableGenerator, getOMFContext, getReferencedClasses, getReferencedClassMetaData, getSubclassesForClass, hasMetaDataForClass, initialiseAbstractClassMetaData, initialiseClassMetaData, initialiseFileMetaData, initialiseFileMetaDataForUse, initialiseInterfaceMetaData, isClassPersistable, isClassWithoutPersistenceInfo, isEnhancing, isFieldTypePersistable, isPersistentDefinitionImplementation, isPersistentInterface, isPersistentInterfaceImplementation, loadAnnotationsForClass, loadClasses, loadFiles, loadJar, loadMetadataFiles, loadPersistenceUnit, loadUserMetaData, logConfiguration, parsePersistenceFiles, populateAbstractClassMetaData, populateFileMetaData, readMetaDataForClass, readMetaDataForMember, registerFetchPlansForFile, registerImplementationOfAbstractClass, registerListener, registerMetaDataForClass, registerPersistentInterface, registerQueriesForFile, registerQueryResultMetaDataForFile, registerSequencesForFile, registerTableGeneratorsForFile, setAllowMetaDataLoad, setValidate, supportsORM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected java.util.List listeners
EventListeners. Use a list to preserve ordering.

Constructor Detail

JPAMetaDataManager

public JPAMetaDataManager(org.datanucleus.OMFContext ctxt)
Constructor.

Parameters:
ctxt - ObjectManagerFactory Context that this metadata manager operates in
Method Detail

getListeners

public java.util.List getListeners()
Get the event listeners

Returns:
the event listeners

parseFile

protected org.datanucleus.metadata.FileMetaData parseFile(java.net.URL fileURL)
Utility to parse a file, using the "jpa" MetaData handler.

Specified by:
parseFile in class org.datanucleus.metadata.MetaDataManager
Parameters:
fileURL - URL of the file
Returns:
The FileMetaData for this file

registerFile

public void registerFile(java.lang.String fileURLString,
                         org.datanucleus.metadata.FileMetaData filemd,
                         org.datanucleus.ClassLoaderResolver clr)
Method to take the FileMetaData and register the relevant parts of it with the various convenience collections/maps that we use for access.

Specified by:
registerFile in class org.datanucleus.metadata.MetaDataManager
Parameters:
fileURLString - URL of the metadata file
filemd - The File MetaData

getMetaDataForClassInternal

public org.datanucleus.metadata.AbstractClassMetaData getMetaDataForClassInternal(java.lang.Class c,
                                                                                  org.datanucleus.ClassLoaderResolver clr)
Accessor for the JPA MetaData for a class. With JPA we either register the classes in "persistence.xml" (via "class", "jar-file" or "mapping-file") or we have them annotated. If they havent been loaded when we loaded "persistence.xml" then we only check for annotations in that class.

Specified by:
getMetaDataForClassInternal in class org.datanucleus.metadata.MetaDataManager
Parameters:
c - The class to find MetaData for
Returns:
The ClassMetaData for this class (or null if not found)


Copyright © 2011. All Rights Reserved.