|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MetaDataFactory
The MetaDataRepository
uses implementations of this interface
to load and store metadata. Implementations need not be threadsafe.
Field Summary | |
---|---|
static int |
STORE_DEFAULT
|
static int |
STORE_PER_CLASS
|
static int |
STORE_VERBOSE
|
Fields inherited from interface org.apache.openjpa.meta.MetaDataModes |
---|
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY |
Method Summary | |
---|---|
void |
addClassExtensionKeys(Collection exts)
Add any extension keys used by this instance to the given set. |
void |
addFieldExtensionKeys(Collection exts)
Add any extension keys used by this instance to the given set. |
void |
clear()
Clear any internal caches. |
boolean |
drop(Class[] cls,
int mode,
ClassLoader envLoader)
Drop the metadata for the given classes in the given mode(s). |
MetaDataDefaults |
getDefaults()
Return the metadata defaults for this factory. |
Set |
getPersistentTypeNames(boolean devpath,
ClassLoader envLoader)
Return all persistent class names, using the metadata locations supplied in configuration, optionally scanning the classpath. |
Class |
getQueryScope(String queryName,
ClassLoader loader)
Return the type defining the given query name, if any. |
Class |
getResultSetMappingScope(String resultSetMappingName,
ClassLoader loader)
Return the type defining the given result set mapping name, if any. |
void |
load(Class cls,
int mode,
ClassLoader envLoader)
Load metadata for the given class in the given mode(s). |
void |
loadXMLMetaData(FieldMetaData fmd)
Load XMLClassMetadata for the given class. |
ClassArgParser |
newClassArgParser()
Return a properly-configured class arg parser for our expected metadata format. |
void |
setRepository(MetaDataRepository repos)
Set the repository to load metadata into. |
void |
setStoreDirectory(File dir)
Base directory for storing metadata. |
void |
setStoreMode(int store)
Storage mode. |
void |
setStrict(boolean strict)
If true, I/O's must exactly obey the mode directives given, and may not load additional information. |
boolean |
store(ClassMetaData[] metas,
QueryMetaData[] queries,
SequenceMetaData[] seqs,
int mode,
Map output)
Store the given metadata. |
Field Detail |
---|
static final int STORE_DEFAULT
static final int STORE_PER_CLASS
static final int STORE_VERBOSE
Method Detail |
---|
void setRepository(MetaDataRepository repos)
void setStoreDirectory(File dir)
void setStoreMode(int store)
void setStrict(boolean strict)
void load(Class cls, int mode, ClassLoader envLoader)
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(int)
.
mode
- the mode to load metadata in: if mapping information is
stored together with metadata, then you can load mapping
data even if this mode only includes
MODE_META
, so long as
the strict
property hasn't been setboolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map output)
mode
- hint about what aspects of the metadata have changedoutput
- if non-null, rather than storing metadata directly,
add entries mapping each output destination such
as a File
to the planned output for that
destination in string form
boolean drop(Class[] cls, int mode, ClassLoader envLoader)
MetaDataDefaults getDefaults()
Set getPersistentTypeNames(boolean devpath, ClassLoader envLoader)
MetaDataRepository.getPersistentTypeNames(boolean, java.lang.ClassLoader)
instead.
MetaDataRepository.getPersistentTypeNames(boolean, java.lang.ClassLoader)
,
MetaDataRepository.loadPersistentTypes(boolean, java.lang.ClassLoader)
Class getQueryScope(String queryName, ClassLoader loader)
Class getResultSetMappingScope(String resultSetMappingName, ClassLoader loader)
ClassArgParser newClassArgParser()
void clear()
void addClassExtensionKeys(Collection exts)
void addFieldExtensionKeys(Collection exts)
void loadXMLMetaData(FieldMetaData fmd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |