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
 
Fields inherited from class org.datanucleus.metadata.MetaDataManager
annotationManager, classesWithoutPersistenceInfo, classMetaDataByClass, classMetaDataByEntityName, directSubclassesByClass, fetchPlanMetaDataByName, fileMetaDataByURLString, initialised, listeners, LOCALISER, metaDataParser, omfContext, queryMetaDataByName, queryResultMetaDataByName, sequenceMetaDataByPackageSequence, supportsORM, tableGeneratorMetaDataByPackageSequence, utilisedFileMetaData, validateMetaData
 
Constructor Summary
JPAMetaDataManager(org.datanucleus.OMFContext ctxt)
          Constructor.
 
Method Summary
 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, getApiAdapter, getClassesImplementingInterface, getClassesWithMetaData, getClassMetaDataForImplementationOfPersistentInterface, getFileMetaData, getImplementationNameForPersistentInterface, getListeners, getMetaDataFactory, getMetaDataForClass, getMetaDataForClass, getMetaDataForEntityName, getMetaDataForFetchPlan, getMetaDataForImplementationOfReference, getMetaDataForInterface, getMetaDataForMember, getMetaDataForMember, getMetaDataForPersistenceUnit, getMetaDataForQuery, getMetaDataForQueryResult, getMetaDataForSequence, getMetaDataForTableGenerator, getOMFContext, getReferencedClassMetaData, getSubclassesForClass, hasMetaDataForClass, initialise, initialise, initialise, initialiseAbstractClassMetaData, initialiseClassMetaData, initialiseFileMetaData, initialiseInterfaceMetaData, isClassPersistable, isClassWithoutPersistenceInfo, isEnhancing, isPersistentDefinitionImplementation, isPersistentInterface, isPersistentInterfaceImplementation, loadAnnotationsForClass, logConfiguration, parsePersistenceFiles, populateAbstractClassMetaData, populateFileMetaData, readMetaDataForClass, readMetaDataForMember, registerFetchPlansForFile, registerImplementationOfAbstractClass, registerMetaDataForClass, registerPersistentInterface, registerQueriesForFile, registerQueryResultMetaDataForFile, registerSequencesForFile, registerTableGeneratorsForFile, setMetaDataFactory, setValidate, supportsORM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAMetaDataManager

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

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

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 © 2009. All Rights Reserved.