|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.meta.NoneMetaDataFactory
public class NoneMetaDataFactory
No-op metadata I/O to prevent attempts to load other classes.
Field Summary |
---|
Fields inherited from interface org.apache.openjpa.meta.MetaDataFactory |
---|
STORE_DEFAULT, STORE_PER_CLASS, STORE_VERBOSE |
Fields inherited from interface org.apache.openjpa.meta.MetaDataModes |
---|
MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY |
Fields inherited from interface org.apache.openjpa.event.CallbackModes |
---|
CALLBACK_FAIL_FAST, CALLBACK_IGNORE, CALLBACK_LOG, CALLBACK_RETHROW, CALLBACK_ROLLBACK |
Constructor Summary | |
---|---|
NoneMetaDataFactory()
|
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). |
Member |
getBackingMember(FieldMetaData fmd)
Return the backing member for the given field metadata. |
int |
getCallbackMode()
What to do on lifecycle callback exceptions. |
boolean |
getCallbacksBeforeListeners(int type)
If callbacks are fired before listeners for the given event type. |
int |
getDefaultAccessType()
Return the default access type for a base persistent class with ClassMetaData.ACCESS_UNKNOWN access type. |
int |
getDefaultIdentityType()
Return the default identity type for unmapped classes without primary key fields. |
MetaDataDefaults |
getDefaults()
Return the metadata defaults for this factory. |
static NoneMetaDataFactory |
getInstance()
|
Set |
getPersistentTypeNames(boolean classpath,
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. |
Class |
getUnimplementedExceptionType()
Return a runtime exception class to throw for un-implemented managed interface methods. |
boolean |
isDataStoreObjectIdFieldUnwrapped()
Whether the field in the object id class corresponding to a datastore id persistence-capable primary key field is the simple datastore id value of the related instance. |
boolean |
isDeclaredInterfacePersistent()
Whether declared interfaces of a class are treated as persistent types. |
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 |
populate(ClassMetaData meta,
int access)
Populate the given metadata with default settings. |
void |
setIgnoreNonPersistent(boolean ignore)
Whether to ignore members which are not persistent by default during metadata population. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoneMetaDataFactory()
Method Detail |
---|
public static NoneMetaDataFactory getInstance()
public void setRepository(MetaDataRepository repos)
MetaDataFactory
setRepository
in interface MetaDataFactory
public void setStoreDirectory(File dir)
MetaDataFactory
setStoreDirectory
in interface MetaDataFactory
public void setStoreMode(int store)
MetaDataFactory
setStoreMode
in interface MetaDataFactory
public void setStrict(boolean strict)
MetaDataFactory
setStrict
in interface MetaDataFactory
public void load(Class cls, int mode, ClassLoader envLoader)
MetaDataFactory
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)
.
load
in interface MetaDataFactory
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 setpublic boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map output)
MetaDataFactory
store
in interface MetaDataFactory
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
public boolean drop(Class[] cls, int mode, ClassLoader envLoader)
MetaDataFactory
drop
in interface MetaDataFactory
public MetaDataDefaults getDefaults()
MetaDataFactory
getDefaults
in interface MetaDataFactory
public Set getPersistentTypeNames(boolean classpath, ClassLoader envLoader)
MetaDataFactory
MetaDataRepository.getPersistentTypeNames(boolean, java.lang.ClassLoader)
instead.
getPersistentTypeNames
in interface MetaDataFactory
MetaDataRepository.getPersistentTypeNames(boolean, java.lang.ClassLoader)
,
MetaDataRepository.loadPersistentTypes(boolean, java.lang.ClassLoader)
public Class getQueryScope(String queryName, ClassLoader loader)
MetaDataFactory
getQueryScope
in interface MetaDataFactory
public Class getResultSetMappingScope(String resultSetMappingName, ClassLoader loader)
MetaDataFactory
getResultSetMappingScope
in interface MetaDataFactory
public ClassArgParser newClassArgParser()
MetaDataFactory
newClassArgParser
in interface MetaDataFactory
public void clear()
MetaDataFactory
clear
in interface MetaDataFactory
public void addClassExtensionKeys(Collection exts)
MetaDataFactory
addClassExtensionKeys
in interface MetaDataFactory
public void addFieldExtensionKeys(Collection exts)
MetaDataFactory
addFieldExtensionKeys
in interface MetaDataFactory
public int getDefaultAccessType()
MetaDataDefaults
ClassMetaData.ACCESS_UNKNOWN
access type.
getDefaultAccessType
in interface MetaDataDefaults
public int getDefaultIdentityType()
MetaDataDefaults
getDefaultIdentityType
in interface MetaDataDefaults
public int getCallbackMode()
MetaDataDefaults
getCallbackMode
in interface MetaDataDefaults
public boolean getCallbacksBeforeListeners(int type)
MetaDataDefaults
getCallbacksBeforeListeners
in interface MetaDataDefaults
public void setIgnoreNonPersistent(boolean ignore)
MetaDataDefaults
setIgnoreNonPersistent
in interface MetaDataDefaults
public boolean isDeclaredInterfacePersistent()
MetaDataDefaults
isDeclaredInterfacePersistent
in interface MetaDataDefaults
public boolean isDataStoreObjectIdFieldUnwrapped()
MetaDataDefaults
isDataStoreObjectIdFieldUnwrapped
in interface MetaDataDefaults
public void populate(ClassMetaData meta, int access)
MetaDataDefaults
populate
in interface MetaDataDefaults
access
- access type constant from ClassMetaData
public Member getBackingMember(FieldMetaData fmd)
MetaDataDefaults
getBackingMember
in interface MetaDataDefaults
public Class getUnimplementedExceptionType()
MetaDataDefaults
getUnimplementedExceptionType
in interface MetaDataDefaults
public void loadXMLMetaData(FieldMetaData fmd)
MetaDataFactory
loadXMLMetaData
in interface MetaDataFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |