Acts as a registry of JDO 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.

When the MetaData is requested for a class, if it isn't already found, the valid
file locations are checked for that class and the file containing it will be
read. The MetaData for all classes, queries, sequences etc in that file are
loaded at that point. In addition, all classes will be "populated" (meaning that
their superclasses are assigned, and unspecified fields are added, and any related
objects are linked). The MetaData of these classes are only initialised when
they are absolutely needed - to avoid generating circular references in the
initialisation process.

Each OMFContext typically will have its own MetaDataManager so allowing
Meta-Data to be for different datastores. In addition, each PMF can allow
MetaData files to use a particular suffix, hence we allow the JDO/ORM file
suffices to be specifiable at construction.

Field Summary

static int

ALL_JDO_LOCATIONS
MetaData files will be searched in all possible locations defined in JDO1.0, JDO1.0.1, JDO2.0 or later

isPersistentInterface(java.lang.String name)
Convenience method to return if the passed class name is a "persistent-interface".

boolean

isPersistentInterfaceImplementation(java.lang.String interfaceName,
java.lang.String implName)
Convenience method to return if the passed class name is an implementation of the passed "persistent-interface".

Method to find the Meta-Data file for a specified class.
Checks the locations one-by-one, and checks for existence of the
specified class in the file. If a valid file is found it is loaded no matter
if the file contains the actual class. When a file is found containing the class
the process stops and the FileMetaData for that file (containing the class) returned.

Allows 2 variations on the naming above. The first is a modifier which
caters for a JDO 2.0 requirement whereby the user can specify a modifier
such as "mysql", which would mean that this should search for filenames
"package-mysql.jdo". The second variation is the suffix of the file.
This is "jdo" by default, but JDO 2.0 has situations where "orm", or
"jdoquery" are required as a suffix.