| java.lang.Object org.jpox.metadata.MetaDataManager
All known Subclasses: org.jpox.jdo.metadata.JDOMetaDataManager,
MetaDataManager | abstract public class MetaDataManager (Code) | | Manager of MetaData information in JPOX having scope of an ObjectManagerFactory.
Each PMF/EMF will effectively have a single MetaDataManager handling all XML/Annotations MetaData.
A MetaDataManager can be "initialised" to start with particular MetaData. This is typically performed
when the operation has a "persistence-unit", which defines the classes/jars/mapping-files to use.
Alternatively, it can be initialised using a set of classes and mapping-files (for use by SchemaTool
and the Enhancer when specifying the files as input).
Acts as a registry of metadata so that metadata files don't need to be
parsed multiple times. MetaData is stored as a FileMetaData, which contains
PackageMetaData, which contains ClassMetaData, and so on. This maps exactly
to the users model of their metadata. The users access point is
getMetaDataForClass() which will check the known classes without metadata,
then check the existing registered metdata, then check the valid locations for
metdata files. This way, the metadata is managed from this single point.
Maintains a list of all classes that have been checked for MetaData and
don't have any available. This avoids the needs to look up MetaData multiple
times finding the same result. Currently this list is for all ClassMetaData
objects keyed by the class name.
TODO Update MetaDataManager to be able to share ClassMetaData with other MetaDataManager
so we need a central (singleton/static) registry that allows such communication.
version: $Revision: 1.170 $ |
Method Summary | |
void | addAnnotationsDataToClass(Class c, AbstractClassMetaData cmd, ClassLoaderResolver clr) Load up and add any annotations mapping info for the specified class to the stored ClassMetaData. | protected void | addORMDataToClass(Class c, ClassLoaderResolver clr) Load up and add any O/R mapping info for the specified class to the stored ClassMetaData (if supported). | public void | close() | public ApiAdapter | getApiAdapter() Accessor for the API adapter being used by this MetaDataManager. | public ClassMetaData | getClassMetaDataForImplementationOfPersistentInterface(String interfaceName) Accessor for the metadata for the implementation of the specified "persistent-interface". | public String[] | getClassesImplementingInterface(String interfaceName, ClassLoaderResolver clr) Accessor for the list of names of classes that are declared to implement the specified interface
(using <implements> in the MetaData). | public Collection | getClassesWithMetaData() Accessor for the names of the classes with MetaData currently registered with this manager. | public FileMetaData[] | getFileMetaData() Accessor for all FileMetaData currently managed here. | public String | getImplementationNameForPersistentInterface(String interfaceName) Accessor for the implementation name for the specified "persistent-interface". | public List | getListeners() | public MetaDataFactory | getMetaDataFactory() Accessor for a factory for MetaData objects. | public synchronized AbstractClassMetaData | getMetaDataForClass(String className, ClassLoaderResolver clr) Accessor for the MetaData for a class given the name and a loader.
All MetaData returned from this method will be initialised and ready for full use.
If the class can't be loaded, null will be returned. | public synchronized AbstractClassMetaData | getMetaDataForClass(Class c, ClassLoaderResolver clr) Main accessor for the MetaData for a class. | abstract public AbstractClassMetaData | getMetaDataForClassInternal(Class c, ClassLoaderResolver clr) Internal convenience method for accessing the MetaData for a class. | public synchronized AbstractClassMetaData | getMetaDataForEntityName(String entityName) Accessor for the MetaData for a class given the "entity-name". | public FetchPlanMetaData | getMetaDataForFetchPlan(String name) Accessor for the MetaData for a named fetch plan. | public ClassMetaData | getMetaDataForImplementationOfReference(Class referenceClass, Object implValue, ClassLoaderResolver clr) Accessor for the MetaData for an implementation of a reference type. | public InterfaceMetaData | getMetaDataForInterface(Class c, ClassLoaderResolver clr) Accessor for the MetaData for an interface. | public AbstractMemberMetaData | getMetaDataForMember(String className, String memberName, ClassLoaderResolver clr) Accessor for the MetaData for a field/property of a class. | public AbstractMemberMetaData | getMetaDataForMember(Class c, ClassLoaderResolver clr, String memberName) Accessor for the MetaData for a field/property of a class. | public PersistenceUnitMetaData | getMetaDataForPersistenceUnit(String unitName) Method to parse all available "persistence.xml" files and return the metadata
for the persistence unit with the specified name. | public QueryMetaData | getMetaDataForQuery(Class cls, ClassLoaderResolver clr, String queryName) Accessor for the MetaData for a named query for a class. | public QueryResultMetaData | getMetaDataForQueryResult(String name) Accessor for the MetaData for a QueryResult. | public SequenceMetaData | getMetaDataForSequence(ClassLoaderResolver clr, String seqName) Accessor for the MetaData for a Sequence in a package. | public TableGeneratorMetaData | getMetaDataForTableGenerator(ClassLoaderResolver clr, String genName) Accessor for the MetaData for a TableGenerator in a package. | public OMFContext | getOMFContext() Accessor for the ObjectManagerFactory Context that this manager is running in. | public List | getReferencedClassMetaData(AbstractClassMetaData cmd, String dba_vendor_id, ClassLoaderResolver clr) Utility to return all ClassMetaData that is referenced from the supplier
class.
Parameters: cmd - The origin class's MetaData. Parameters: dba_vendor_id - The Vendor id of the database adapter in use.(Used in handling "views" support) Parameters: clr - ClassLoaderResolver resolver for loading any classes. | public String[] | getSubclassesForClass(String className, boolean includeDescendents) Accessor for the subclasses of a particular class
Parameters: className - Name of the class that we want the known subclasses for. Parameters: includeDescendents - Whether to include subclasses of subclasses etc Names of the subclasses. | public boolean | hasMetaDataForClass(String className) Convenience method to check if we have metadata present for the specified class. | public FileMetaData[] | initialise(String[] metadataFiles, String[] classNames, ClassLoaderResolver clr) Initialisation method to define the initial metadata files and class names being handled by this MetaDataManager. | public FileMetaData[] | initialise(String persistenceUnitName, ClassLoaderResolver clr) Initialisation method to define the "persistence-unit" being handled by this MetaDataManager. | public FileMetaData[] | initialise(PersistenceUnitMetaData pumd, ClassLoaderResolver clr) Initialisation method to define the "persistence-unit" being handled by this MetaDataManager. | protected void | initialiseClassMetaData(ClassMetaData cmd, Class cls, ClassLoaderResolver clr) Utility to initialise the MetaData for a class, using the specified
class. | protected void | initialiseFileMetaData(FileMetaData filemd, ClassLoaderResolver clr, ClassLoader primary) Initialise all classes/interfaces in a Meta-Data file. | protected void | initialiseInterfaceMetaData(InterfaceMetaData imd, ClassLoaderResolver clr, ClassLoader primary) Utility to initialise the MetaData for a interface, using the specified
class. | public boolean | isClassPersistable(String className) Convenience method to return if the specified class is a known persistable class. | protected boolean | isClassWithoutPersistenceInfo(String className) Accessor for whether a class doesn't have MetaData or annotations. | public boolean | isEnhancing() Accessor for whether we are managing the enhancement process. | public boolean | isPersistentDefinitionImplementation(String implName) Convenience method to return if the passed class name is an implementation of a "persistent definition". | public boolean | isPersistentInterface(String name) Convenience method to return if the passed class name is a "persistent-interface". | public boolean | isPersistentInterfaceImplementation(String interfaceName, String implName) Convenience method to return if the passed class name is an implementation of the passed "persistent-interface". | protected FileMetaData | loadAnnotationsForClass(Class cls, ClassLoaderResolver clr, boolean register, boolean populate) Method to load the annotations for the specified class and return the FileMetaData containing
the class. | protected void | logConfiguration() Method to log the configuration of this manager. | abstract protected FileMetaData | parseFile(URL file_url) Utility to parse a MetaData file. | public PersistenceFileMetaData[] | parsePersistenceFiles() Method to parse the available "persistence.xml" files returning the metadata for all found. | protected void | populateFileMetaData(FileMetaData filemd, ClassLoaderResolver clr, ClassLoader primary) Convenience method to populate all classes/interfaces in a Meta-Data file. | public AbstractClassMetaData | readMetaDataForClass(String className) Method to access the (already known) metadata for the specified class. | public AbstractMemberMetaData | readMetaDataForMember(String className, String memberName) Method to access the (already known) metadata for the field/property of the specified class. | protected void | registerFetchPlansForFile(FileMetaData filemd) Convenience method to register all FetchPlans found in the passed file. | abstract public void | registerFile(String fileURLString, FileMetaData filemd, ClassLoaderResolver clr) Method to take the FileMetaData and register the relevant parts of it with the assorted caches provided. | public void | registerImplementationOfAbstractClass(ClassMetaData cmd, Class implClass, ClassLoaderResolver clr) Method to register the metadata for an implementation of a persistent abstract class. | public void | registerPersistentInterface(InterfaceMetaData imd, Class implClass, ClassLoaderResolver clr) Method to register a persistent interface and its implementation with the MetaData system. | protected void | registerQueriesForFile(FileMetaData filemd) Convenience method to register all queries found in the passed file. | protected void | registerQueryResultMetaDataForFile(FileMetaData filemd) Convenience method to register all table generators found in the passed file. | protected void | registerSequencesForFile(FileMetaData filemd) Convenience method to register all sequences found in the passed file. | protected void | registerTableGeneratorsForFile(FileMetaData filemd) Convenience method to register all table generators found in the passed file. | public void | setEnhancing() Method to set that the Manager is enhancing classes. | public void | setMetaDataFactory(MetaDataFactory factory) Method to set the Factory for MetaData objects. | public void | setValidate(boolean validate) Mutator for whether to validate the MetaData files for XML compliance. | public boolean | supportsORM() Accessor for whether the MetaData manager supports ORM concepts and metadata. | public void | unsetEnhancing() Method to set that the Manager is not enhancing classes. |
LOCALISER | final protected static Localiser LOCALISER(Code) | | Localiser for messages.
|
classMetaDataByClass | protected Map classMetaDataByClass(Code) | | Map of ClassMetaData, keyed by the class name.
|
classMetaDataByEntityName | protected Map classMetaDataByEntityName(Code) | | Map of ClassMetaData, keyed by the JPA "entity name".
|
classesWithoutPersistenceInfo | protected Collection classesWithoutPersistenceInfo(Code) | | Cache of class names that are known to not have MetaData/annotations.
|
enhancing | protected boolean enhancing(Code) | | Indicator for whether this manager is managing the enhancement process, else it's runtime.
|
fetchPlanMetaDataByName | protected Map fetchPlanMetaDataByName(Code) | | Map of FetchPlanMetaData, keyed by the fetch plan name.
|
fileMetaDataByURLString | protected Map fileMetaDataByURLString(Code) | | Map of FileMetaData for the parsed files, keyed by the URL string.
|
initialised | protected boolean initialised(Code) | | Flag for initialisation state when starting using a "persistence-unit". Used to prevent double initialise.
|
listeners | protected List listeners(Code) | | EventListeners. Use a list to preserve ordering.
|
omfContext | protected OMFContext omfContext(Code) | | The ObjectManagerFactory Context that this metadata manager is operating in.
|
queryMetaDataByName | protected Map queryMetaDataByName(Code) | | Map of QueryMetaData, keyed by the (class name + query name).
|
queryResultMetaDataByName | protected Map queryResultMetaDataByName(Code) | | Map of QueryResultMetaData keyed by the name.
|
sequenceMetaDataByPackageSequence | protected Map sequenceMetaDataByPackageSequence(Code) | | Map of SequenceMetaData, keyed by the package name and sequence name.
|
supportsORM | protected boolean supportsORM(Code) | | Whether the MetaData manager supports ORM concepts and metadata.
When using an object datastore this will be false.
|
tableGeneratorMetaDataByPackageSequence | protected Map tableGeneratorMetaDataByPackageSequence(Code) | | Map of TableGeneratorMetaData, keyed by the package name and generator name.
|
utilisedFileMetaData | protected ArrayList utilisedFileMetaData(Code) | | Temporary list of the FileMetaData objects utilised in this call for metadata.
|
validateMetaData | protected boolean validateMetaData(Code) | | Flag whether we should validate the metadata files when parsing.
|
MetaDataManager | public MetaDataManager(OMFContext ctxt)(Code) | | Constructor, specifying the OMFContext used.
Parameters: ctxt - OMF Context that this metadata manager operates in |
addAnnotationsDataToClass | void addAnnotationsDataToClass(Class c, AbstractClassMetaData cmd, ClassLoaderResolver clr)(Code) | | Load up and add any annotations mapping info for the specified class to the stored ClassMetaData.
Is package-access so that is only accessable by MetaData classes
Parameters: c - The class Parameters: cmd - the metadata to add annotation to Parameters: clr - ClassLoader resolver |
addORMDataToClass | protected void addORMDataToClass(Class c, ClassLoaderResolver clr)(Code) | | Load up and add any O/R mapping info for the specified class to the stored ClassMetaData (if supported).
This implementation does nothing so if ORM files are supported then this should be overridden by subclasses.
Is package-access so that is only accessable by MetaData classes
Parameters: c - The class Parameters: clr - ClassLoader resolver |
close | public void close()(Code) | | Clear resources
|
getApiAdapter | public ApiAdapter getApiAdapter()(Code) | | Accessor for the API adapter being used by this MetaDataManager.
API adapter. |
getClassMetaDataForImplementationOfPersistentInterface | public ClassMetaData getClassMetaDataForImplementationOfPersistentInterface(String interfaceName)(Code) | | Accessor for the metadata for the implementation of the specified "persistent-interface".
Parameters: interfaceName - The name of the persistent interface The ClassMetaData of the implementation class |
getClassesImplementingInterface | public String[] getClassesImplementingInterface(String interfaceName, ClassLoaderResolver clr)(Code) | | Accessor for the list of names of classes that are declared to implement the specified interface
(using <implements> in the MetaData). This will include subclasses of declared classes. Ignore abstract classes.
The array of implementation class names will have the initial implementations first followed by
the subclass implementations etc. So for example if we look for all implementations of I and A implements I
and B extends A, then it will return [A, B] in that order.
Parameters: interfaceName - Name of the interface Parameters: clr - The ClassLoaderResolver The names of the classes declared as implementing that interface. return null if no classes |
getClassesWithMetaData | public Collection getClassesWithMetaData()(Code) | | Accessor for the names of the classes with MetaData currently registered with this manager.
Names of classes with MetaData |
getFileMetaData | public FileMetaData[] getFileMetaData()(Code) | | Accessor for all FileMetaData currently managed here.
FileMetaData managed here currently |
getImplementationNameForPersistentInterface | public String getImplementationNameForPersistentInterface(String interfaceName)(Code) | | Accessor for the implementation name for the specified "persistent-interface".
Parameters: interfaceName - The name of the persistent interface The name of the implementation class |
getListeners | public List getListeners()(Code) | | Get the event listeners
the event listeners |
getMetaDataFactory | public MetaDataFactory getMetaDataFactory()(Code) | | Accessor for a factory for MetaData objects.
The factory of objects |
getMetaDataForClass | public synchronized AbstractClassMetaData getMetaDataForClass(String className, ClassLoaderResolver clr)(Code) | | Accessor for the MetaData for a class given the name and a loader.
All MetaData returned from this method will be initialised and ready for full use.
If the class can't be loaded, null will be returned.
Parameters: className - Name of the class to find MetaData for Parameters: clr - ClassLoaderResolver resolver for use in loading the class. The ClassMetaData for this class (or null if not found) |
getMetaDataForClass | public synchronized AbstractClassMetaData getMetaDataForClass(Class c, ClassLoaderResolver clr)(Code) | | Main accessor for the MetaData for a class.
All MetaData returned from this method will be initialised and ready for full use.
Parameters: c - The class to find MetaData for Parameters: clr - the ClassLoaderResolver The ClassMetaData for this class (or null if not found) |
getMetaDataForClassInternal | abstract public AbstractClassMetaData getMetaDataForClassInternal(Class c, ClassLoaderResolver clr)(Code) | | Internal convenience method for accessing the MetaData for a class.
MetaData returned by this method may be uninitialised so should only really
be used in initialisation processes.
To be implemented by the implementing class.
Parameters: c - The class to find MetaData for The ClassMetaData for this class (or null if not found) |
getMetaDataForEntityName | public synchronized AbstractClassMetaData getMetaDataForEntityName(String entityName)(Code) | | Accessor for the MetaData for a class given the "entity-name".
Parameters: entityName - The entity name to find MetaData for The ClassMetaData for this entity name (or null if not found) |
getMetaDataForFetchPlan | public FetchPlanMetaData getMetaDataForFetchPlan(String name)(Code) | | Accessor for the MetaData for a named fetch plan.
Parameters: name - Name of the fetch plan The FetchPlanMetaData for this name (if any) |
getMetaDataForImplementationOfReference | public ClassMetaData getMetaDataForImplementationOfReference(Class referenceClass, Object implValue, ClassLoaderResolver clr)(Code) | | Accessor for the MetaData for an implementation of a reference type.
Finds the metadata for the implementation of this reference.
Parameters: referenceClass - The reference class to find MetaData for Parameters: implValue - Object of an implementation class, to return if possible (null=ignore) Parameters: clr - ClassLoader resolver The ClassMetaData for an implementation of a reference type |
getMetaDataForInterface | public InterfaceMetaData getMetaDataForInterface(Class c, ClassLoaderResolver clr)(Code) | | Accessor for the MetaData for an interface.
Part of the support for "persistent-interface".
This defaults to returning null since interfaces are only supported by JDO.
Parameters: c - The interface to find MetaData for Parameters: clr - the ClassLoaderResolver The InterfaceMetaData for this interface (or null if not found) |
getMetaDataForMember | public AbstractMemberMetaData getMetaDataForMember(String className, String memberName, ClassLoaderResolver clr)(Code) | | Accessor for the MetaData for a field/property of a class.
Utilises getMetaDataForClass, and then finds the relevant field/property.
Parameters: className - The name of the class owning the field/property Parameters: memberName - The name of the field to find MetaData for Parameters: clr - ClassLoaderResolver resolver for any loading of classes The metadata for this field/property (or null if not found) |
getMetaDataForMember | public AbstractMemberMetaData getMetaDataForMember(Class c, ClassLoaderResolver clr, String memberName)(Code) | | Accessor for the MetaData for a field/property of a class.
Utilises getMetaDataForClass, and then finds the relevant field/property.
Parameters: c - The class owning the field/property Parameters: clr - the ClassLoaderResolver Parameters: memberName - The name of the field/property to find MetaData for The metadata for this field/property (or null if not found) |
getMetaDataForPersistenceUnit | public PersistenceUnitMetaData getMetaDataForPersistenceUnit(String unitName)(Code) | | Method to parse all available "persistence.xml" files and return the metadata
for the persistence unit with the specified name.
Parameters: unitName - Name of the persistence-unit MetaData for the persistence-unit of the specified name (or null if not found) throws: JPOXUserException - if no "persistence.xml" files are found |
getMetaDataForQuery | public QueryMetaData getMetaDataForQuery(Class cls, ClassLoaderResolver clr, String queryName)(Code) | | Accessor for the MetaData for a named query for a class.
If the class is not specified, searches for the query with this name for any class.
Will only return metadata for queries already registered in this implementation.
Parameters: cls - The class which has the query defined for it Parameters: clr - the ClassLoaderResolver Parameters: queryName - Name of the query The QueryMetaData for the query for this class |
getMetaDataForQueryResult | public QueryResultMetaData getMetaDataForQueryResult(String name)(Code) | | Accessor for the MetaData for a QueryResult.
Parameters: name - Name of the query result The QueryResultMetaData under this name |
getMetaDataForSequence | public SequenceMetaData getMetaDataForSequence(ClassLoaderResolver clr, String seqName)(Code) | | Accessor for the MetaData for a Sequence in a package.
This implementation simply checks what is already loaded and returns if found
Parameters: clr - the ClassLoaderResolver Parameters: seqName - Name of the package (fully qualified if necessary) The SequenceMetaData for this named sequence |
getMetaDataForTableGenerator | public TableGeneratorMetaData getMetaDataForTableGenerator(ClassLoaderResolver clr, String genName)(Code) | | Accessor for the MetaData for a TableGenerator in a package.
This implementation simply checks what is already loaded and returns if found
Parameters: clr - the ClassLoaderResolver Parameters: genName - Name of the package (fully qualified if necessary) The TableGenerator for this named generator |
getOMFContext | public OMFContext getOMFContext()(Code) | | Accessor for the ObjectManagerFactory Context that this manager is running in.
The ObjectManagerFactory Context |
getReferencedClassMetaData | public List getReferencedClassMetaData(AbstractClassMetaData cmd, String dba_vendor_id, ClassLoaderResolver clr)(Code) | | Utility to return all ClassMetaData that is referenced from the supplier
class.
Parameters: cmd - The origin class's MetaData. Parameters: dba_vendor_id - The Vendor id of the database adapter in use.(Used in handling "views" support) Parameters: clr - ClassLoaderResolver resolver for loading any classes. List of ClassMetaData referenced by the origin |
getSubclassesForClass | public String[] getSubclassesForClass(String className, boolean includeDescendents)(Code) | | Accessor for the subclasses of a particular class
Parameters: className - Name of the class that we want the known subclasses for. Parameters: includeDescendents - Whether to include subclasses of subclasses etc Names of the subclasses. return null if there are no subclasses |
hasMetaDataForClass | public boolean hasMetaDataForClass(String className)(Code) | | Convenience method to check if we have metadata present for the specified class.
Parameters: className - The name of the class to check Whether the metadata is already registered for this class |
initialise | public FileMetaData[] initialise(String[] metadataFiles, String[] classNames, ClassLoaderResolver clr)(Code) | | Initialisation method to define the initial metadata files and class names being handled by this MetaDataManager.
Parameters: metadataFiles - The metadata files Parameters: classNames - The class names Parameters: clr - ClassLoader Resolver Array of the FileMetaData that is managed throws: JPOXUserException - (with nested exceptions) if an error occurs parsing the files |
initialise | public FileMetaData[] initialise(String persistenceUnitName, ClassLoaderResolver clr)(Code) | | Initialisation method to define the "persistence-unit" being handled by this MetaDataManager.
Parameters: persistenceUnitName - name of the "persistence-unit" Parameters: clr - ClassLoader Resolver Array of the FileMetaData that is managed throws: JPOXUserException - if an error occurs parsing the persistence-unit info |
initialise | public FileMetaData[] initialise(PersistenceUnitMetaData pumd, ClassLoaderResolver clr)(Code) | | Initialisation method to define the "persistence-unit" being handled by this MetaDataManager.
Parameters: pumd - The MetaData for this "persistence-unit" Parameters: clr - ClassLoader Resolver Array of the FileMetaData that is managed throws: JPOXUserException - if an error occurs parsing the persistence-unit info |
initialiseClassMetaData | protected void initialiseClassMetaData(ClassMetaData cmd, Class cls, ClassLoaderResolver clr)(Code) | | Utility to initialise the MetaData for a class, using the specified
class. This assigns defaults to tags that haven't been assigned.
If the class that is being used to populate the MetaData is not
enhanced, this will throw a JPOXUserException informing them of this.
Parameters: cmd - The classes metadata Parameters: cls - The class to use as a basis for initialisation Parameters: clr - ClassLoader resolver to use throws: JPOXUserException - if the class is not enhanced |
initialiseFileMetaData | protected void initialiseFileMetaData(FileMetaData filemd, ClassLoaderResolver clr, ClassLoader primary)(Code) | | Initialise all classes/interfaces in a Meta-Data file.
Parameters: filemd - the FileMetaData Parameters: clr - ClassLoader resolver to use Parameters: primary - the primary ClassLoader to use (or null) |
initialiseInterfaceMetaData | protected void initialiseInterfaceMetaData(InterfaceMetaData imd, ClassLoaderResolver clr, ClassLoader primary)(Code) | | Utility to initialise the MetaData for a interface, using the specified
class. This assigns defaults to tags that haven't been assigned.
If the class that is being used to populate the MetaData is not
enhanced, this will throw a JPOXUserException informing them of this.
Parameters: imd - The interface metadata Parameters: clr - The loader of the interface Parameters: primary - the primary ClassLoader to use (or null) |
isClassPersistable | public boolean isClassPersistable(String className)(Code) | | Convenience method to return if the specified class is a known persistable class.
Parameters: className - Name of the class Whether it is persistable |
isClassWithoutPersistenceInfo | protected boolean isClassWithoutPersistenceInfo(String className)(Code) | | Accessor for whether a class doesn't have MetaData or annotations.
Parameters: className - Name of the class Whether it has no metadata and annotations |
isEnhancing | public boolean isEnhancing()(Code) | | Accessor for whether we are managing the enhancement process.
Whether we are enhancing |
isPersistentDefinitionImplementation | public boolean isPersistentDefinitionImplementation(String implName)(Code) | | Convenience method to return if the passed class name is an implementation of a "persistent definition".
Parameters: implName - The implementation name Whether it is a (JPOX-generated) impl of the persistent interface or abstract class |
isPersistentInterface | public boolean isPersistentInterface(String name)(Code) | | Convenience method to return if the passed class name is a "persistent-interface".
Parameters: name - Name if the interface Whether it is a "persistent-interface" |
isPersistentInterfaceImplementation | public boolean isPersistentInterfaceImplementation(String interfaceName, String implName)(Code) | | Convenience method to return if the passed class name is an implementation of the passed "persistent-interface".
Parameters: interfaceName - Name of the persistent interface Parameters: implName - The implementation name Whether it is a (JPOX-generated) impl of the persistent interface |
loadAnnotationsForClass | protected FileMetaData loadAnnotationsForClass(Class cls, ClassLoaderResolver clr, boolean register, boolean populate)(Code) | | Method to load the annotations for the specified class and return the FileMetaData containing
the class. The FileMetaData, PackageMetaData will be dummy records.
Parameters: cls - The class Parameters: clr - ClassLoader resolver Parameters: register - Whether to register the data Parameters: populate - Whether to populate the data The FileMetaData |
logConfiguration | protected void logConfiguration()(Code) | | Method to log the configuration of this manager.
|
parseFile | abstract protected FileMetaData parseFile(URL file_url)(Code) | | Utility to parse a MetaData file.
Parameters: file_url - URL of the file The FileMetaData for this file |
parsePersistenceFiles | public PersistenceFileMetaData[] parsePersistenceFiles()(Code) | | Method to parse the available "persistence.xml" files returning the metadata for all found.
Searches for all files "META-INF/persistence.xml" in the CLASSPATH of the current thread.
The metadata for all "persistence.xml" files |
populateFileMetaData | protected void populateFileMetaData(FileMetaData filemd, ClassLoaderResolver clr, ClassLoader primary)(Code) | | Convenience method to populate all classes/interfaces in a Meta-Data file.
Parameters: filemd - The MetaData file Parameters: clr - Class Loader to use in population Parameters: primary - the primary ClassLoader to use (or null) |
readMetaDataForClass | public AbstractClassMetaData readMetaDataForClass(String className)(Code) | | Method to access the (already known) metadata for the specified class.
If the class is not yet known about it returns null.
Parameters: className - Name of the class MetaData for the class |
readMetaDataForMember | public AbstractMemberMetaData readMetaDataForMember(String className, String memberName)(Code) | | Method to access the (already known) metadata for the field/property of the specified class.
If the class (or this field/property) is not yet known about it returns null.
Parameters: className - Name of the class Parameters: memberName - Name of the field/property MetaData for the field/property |
registerFetchPlansForFile | protected void registerFetchPlansForFile(FileMetaData filemd)(Code) | | Convenience method to register all FetchPlans found in the passed file.
Parameters: filemd - MetaData for the file |
registerFile | abstract public void registerFile(String fileURLString, FileMetaData filemd, ClassLoaderResolver clr)(Code) | | Method to take the FileMetaData and register the relevant parts of it with the assorted caches provided.
Parameters: fileURLString - URL of the metadata file Parameters: filemd - The File MetaData |
registerImplementationOfAbstractClass | public void registerImplementationOfAbstractClass(ClassMetaData cmd, Class implClass, ClassLoaderResolver clr)(Code) | | Method to register the metadata for an implementation of a persistent abstract class.
Parameters: cmd - MetaData for the abstract class Parameters: implClass - The implementation class Parameters: clr - ClassLoader resolver |
registerPersistentInterface | public void registerPersistentInterface(InterfaceMetaData imd, Class implClass, ClassLoaderResolver clr)(Code) | | Method to register a persistent interface and its implementation with the MetaData system.
Parameters: imd - MetaData for the interface Parameters: implClass - The implementation class Parameters: clr - ClassLoader Resolver to use |
registerQueriesForFile | protected void registerQueriesForFile(FileMetaData filemd)(Code) | | Convenience method to register all queries found in the passed file.
Parameters: filemd - MetaData for the file |
registerQueryResultMetaDataForFile | protected void registerQueryResultMetaDataForFile(FileMetaData filemd)(Code) | | Convenience method to register all table generators found in the passed file.
Parameters: filemd - MetaData for the file |
registerSequencesForFile | protected void registerSequencesForFile(FileMetaData filemd)(Code) | | Convenience method to register all sequences found in the passed file.
Parameters: filemd - MetaData for the file |
registerTableGeneratorsForFile | protected void registerTableGeneratorsForFile(FileMetaData filemd)(Code) | | Convenience method to register all table generators found in the passed file.
Parameters: filemd - MetaData for the file |
setEnhancing | public void setEnhancing()(Code) | | Method to set that the Manager is enhancing classes.
This implies using slightly weaker checks during read/populate/initialise of MetaData.
|
setMetaDataFactory | public void setMetaDataFactory(MetaDataFactory factory)(Code) | | Method to set the Factory for MetaData objects.
This is used to create Class, Field, Property, Interface objects.
Parameters: factory - The factory |
setValidate | public void setValidate(boolean validate)(Code) | | Mutator for whether to validate the MetaData files for XML compliance.
Parameters: validate - Whether to validate |
supportsORM | public boolean supportsORM()(Code) | | Accessor for whether the MetaData manager supports ORM concepts and metadata.
With object datastores this will return false.
Whether we support ORM |
unsetEnhancing | public void unsetEnhancing()(Code) | | Method to set that the Manager is not enhancing classes.
This implies reverting to the normal checks during read/populate/initialise of MetaData.
|
|
|