| org.apache.openjpa.meta.MetaDataFactory
All known Subclasses: org.apache.openjpa.meta.AbstractMetaDataFactory, org.apache.openjpa.meta.DelegatingMetaDataFactory, org.apache.openjpa.meta.NoneMetaDataFactory,
MetaDataFactory | public interface MetaDataFactory extends MetaDataModes(Code) | | The
MetaDataRepository uses implementations of this interface
to load and store metadata. Implementations need not be threadsafe.
author: Patrick Linskey author: Abe White |
Method Summary | |
public void | addClassExtensionKeys(Collection exts) Add any extension keys used by this instance to the given set. | public void | addFieldExtensionKeys(Collection exts) Add any extension keys used by this instance to the given set. | public void | clear() Clear any internal caches. | public boolean | drop(Class[] cls, int mode, ClassLoader envLoader) Drop the metadata for the given classes in the given mode(s). | public MetaDataDefaults | getDefaults() Return the metadata defaults for this factory. | public Set | getPersistentTypeNames(boolean devpath, ClassLoader envLoader) Return all persistent class names, using the metadata locations supplied
in configuration, optionally scanning the classpath.
Return null if no types are supplied and this factory is unable to scan
the classpath. | public Class | getQueryScope(String queryName, ClassLoader loader) Return the type defining the given query name, if any. | public Class | getResultSetMappingScope(String resultSetMappingName, ClassLoader loader) Return the type defining the given result set mapping name, if any. | public void | load(Class cls, int mode, ClassLoader envLoader) Load metadata for the given class in the given mode(s). | public void | loadXMLMetaData(FieldMetaData fmd) Load XMLClassMetadata for the given class. | public ClassArgParser | newClassArgParser() Return a properly-configured class arg parser for our expected
metadata format. | public void | setRepository(MetaDataRepository repos) Set the repository to load metadata into. | public void | setStoreDirectory(File dir) Base directory for storing metadata. | public void | setStoreMode(int store) Storage mode. | public void | setStrict(boolean strict) If true, I/O's must exactly obey the mode directives given, and may
not load additional information. | public boolean | store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map output) Store the given metadata. |
STORE_DEFAULT | final public static int STORE_DEFAULT(Code) | | |
STORE_PER_CLASS | final public static int STORE_PER_CLASS(Code) | | |
STORE_VERBOSE | final public static int STORE_VERBOSE(Code) | | |
addClassExtensionKeys | public void addClassExtensionKeys(Collection exts)(Code) | | Add any extension keys used by this instance to the given set.
|
addFieldExtensionKeys | public void addFieldExtensionKeys(Collection exts)(Code) | | Add any extension keys used by this instance to the given set.
|
clear | public void clear()(Code) | | Clear any internal caches.
|
drop | public boolean drop(Class[] cls, int mode, ClassLoader envLoader)(Code) | | Drop the metadata for the given classes in the given mode(s).
false if any metadata could not be dropped |
getResultSetMappingScope | public Class getResultSetMappingScope(String resultSetMappingName, ClassLoader loader)(Code) | | Return the type defining the given result set mapping name, if any.
|
load | public void load(Class cls, int mode, ClassLoader envLoader)(Code) | | Load metadata for the given class in the given mode(s). If loading
in
MetaDataModes.MODE_QUERY , the class may be null. Loaded
metadata should be added directly to the repository. It should have
its source mode set appropriately via
ClassMetaData.setSourceMode .
Parameters: mode - the mode to load metadata in: if mapping information isstored together with metadata, then you can load mappingdata even if this mode only includesMetaDataModes.MODE_META MODE_META, so long asthe strict property hasn't been set |
loadXMLMetaData | public void loadXMLMetaData(FieldMetaData fmd)(Code) | | Load XMLClassMetadata for the given class. Loaded
metadata should be added directly to the repository.
|
newClassArgParser | public ClassArgParser newClassArgParser()(Code) | | Return a properly-configured class arg parser for our expected
metadata format.
|
setRepository | public void setRepository(MetaDataRepository repos)(Code) | | Set the repository to load metadata into.
This method will be called before use.
|
setStoreDirectory | public void setStoreDirectory(File dir)(Code) | | Base directory for storing metadata. May not be called.
|
setStoreMode | public void setStoreMode(int store)(Code) | | Storage mode. May not be called.
|
setStrict | public void setStrict(boolean strict)(Code) | | If true, I/O's must exactly obey the mode directives given, and may
not load additional information.
|
store | public boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map output)(Code) | | Store the given metadata.
Parameters: mode - hint about what aspects of the metadata have changed Parameters: output - if non-null, rather than storing metadata directly,add entries mapping each output destination suchas a File to the planned output for thatdestination in string form false if this factory is unable to store metadata |
|
|