public class NoneMetaDataFactory extends Object implements MetaDataFactory, MetaDataDefaults
STORE_DEFAULT, STORE_PER_CLASS, STORE_VERBOSEMODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERYCALLBACK_FAIL_FAST, CALLBACK_IGNORE, CALLBACK_LOG, CALLBACK_RETHROW, CALLBACK_ROLLBACK| Constructor and Description |
|---|
NoneMetaDataFactory() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
getDefaultSchema()
Returns the default schema.
|
static NoneMetaDataFactory |
getInstance() |
Class<?> |
getManagedClass(Class<?> c)
Gets the managed class corresponding to the given meta-class.
|
String |
getManagedClassName(String metamodelClassName)
Gets the name of the managed class for the given fully-qualified
meta-model class name.
|
Member |
getMemberByProperty(ClassMetaData meta,
String property,
int access,
boolean scan)
Get the field or getter for the given attribute of the given class.
|
String |
getMetaModelClassName(String managedClassName)
Gets the name of the meta-model class for the given fully-qualified
managed class name.
|
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<? extends Exception> |
getUnimplementedExceptionType()
Return a runtime exception class to throw for un-implemented
managed interface methods.
|
boolean |
isAbstractMappingUniDirectional(OpenJPAConfiguration conf)
Whether the relationship in MappedSuper class must be
uni-directional.
|
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.
|
Boolean |
isDefaultCascadePersistEnabled()
Whether cascade-persist was declared in the persistence unit defaults.
|
boolean |
isMetaClass(Class<?> c)
Affirms if the given class is a meta-class.
|
boolean |
isNonDefaultMappingAllowed(OpenJPAConfiguration conf)
Whether non-default mapping is allowed.
|
void |
load(Class cls,
int mode,
ClassLoader envLoader)
Load metadata for the given class in the given mode(s).
|
void |
loadXMLMetaData(Class<?> cls)
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 |
populate(ClassMetaData meta,
int access,
boolean ignoreTransient)
Populate the given metadata with default settings.
|
void |
setDefaultCascadePersistEnabled(Boolean bool) |
void |
setDefaultSchema(String schema)
Sets the default schema.
|
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.
|
public static NoneMetaDataFactory getInstance()
public void setRepository(MetaDataRepository repos)
MetaDataFactorysetRepository in interface MetaDataFactorypublic void setStoreDirectory(File dir)
MetaDataFactorysetStoreDirectory in interface MetaDataFactorypublic void setStoreMode(int store)
MetaDataFactorysetStoreMode in interface MetaDataFactorypublic void setStrict(boolean strict)
MetaDataFactorysetStrict in interface MetaDataFactorypublic void load(Class cls, int mode, ClassLoader envLoader)
MetaDataFactoryMetaDataModes.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 MetaDataFactorymode - 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)
MetaDataFactorystore in interface MetaDataFactorymode - 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 formpublic boolean drop(Class[] cls, int mode, ClassLoader envLoader)
MetaDataFactorydrop in interface MetaDataFactorypublic MetaDataDefaults getDefaults()
MetaDataFactorygetDefaults in interface MetaDataFactorypublic Set getPersistentTypeNames(boolean classpath, ClassLoader envLoader)
MetaDataFactoryMetaDataRepository.getPersistentTypeNames(boolean, java.lang.ClassLoader) instead.public Class getQueryScope(String queryName, ClassLoader loader)
MetaDataFactorygetQueryScope in interface MetaDataFactorypublic Class getResultSetMappingScope(String resultSetMappingName, ClassLoader loader)
MetaDataFactorygetResultSetMappingScope in interface MetaDataFactorypublic ClassArgParser newClassArgParser()
MetaDataFactorynewClassArgParser in interface MetaDataFactorypublic void clear()
MetaDataFactoryclear in interface MetaDataFactorypublic void addClassExtensionKeys(Collection exts)
MetaDataFactoryaddClassExtensionKeys in interface MetaDataFactorypublic void addFieldExtensionKeys(Collection exts)
MetaDataFactoryaddFieldExtensionKeys in interface MetaDataFactorypublic int getDefaultAccessType()
MetaDataDefaultsClassMetaData.ACCESS_UNKNOWN access type.getDefaultAccessType in interface MetaDataDefaultspublic int getDefaultIdentityType()
MetaDataDefaultsgetDefaultIdentityType in interface MetaDataDefaultspublic int getCallbackMode()
MetaDataDefaultsgetCallbackMode in interface MetaDataDefaultspublic boolean getCallbacksBeforeListeners(int type)
MetaDataDefaultsgetCallbacksBeforeListeners in interface MetaDataDefaultspublic void setIgnoreNonPersistent(boolean ignore)
MetaDataDefaultssetIgnoreNonPersistent in interface MetaDataDefaultspublic boolean isDeclaredInterfacePersistent()
MetaDataDefaultsisDeclaredInterfacePersistent in interface MetaDataDefaultspublic boolean isDataStoreObjectIdFieldUnwrapped()
MetaDataDefaultsisDataStoreObjectIdFieldUnwrapped in interface MetaDataDefaultspublic void populate(ClassMetaData meta, int access)
MetaDataDefaultspopulate in interface MetaDataDefaultsaccess - access type constant from ClassMetaDatapublic void populate(ClassMetaData meta, int access, boolean ignoreTransient)
MetaDataDefaultspopulate in interface MetaDataDefaultsaccess - access type constant from ClassMetaDatapublic Member getBackingMember(FieldMetaData fmd)
MetaDataDefaultsgetBackingMember in interface MetaDataDefaultspublic Member getMemberByProperty(ClassMetaData meta, String property, int access, boolean scan)
MetaDataDefaultsgetMemberByProperty in interface MetaDataDefaultsmeta - is the declaring classproperty - name of the logical attributeaccess - whether to look for the field of getter method.
If unknown, then field or property is chosen based on the access type
used by the given class.scan - if true and access is unknown then scans the
annotation on the member to determine access.public Class<? extends Exception> getUnimplementedExceptionType()
MetaDataDefaultsgetUnimplementedExceptionType in interface MetaDataDefaultspublic void loadXMLMetaData(Class<?> cls)
MetaDataFactoryloadXMLMetaData in interface MetaDataFactorypublic String getMetaModelClassName(String managedClassName)
MetaDataFactorygetMetaModelClassName in interface MetaDataFactorypublic String getManagedClassName(String metamodelClassName)
MetaDataFactorygetManagedClassName in interface MetaDataFactorypublic boolean isMetaClass(Class<?> c)
MetaDataFactoryisMetaClass in interface MetaDataFactorypublic Class<?> getManagedClass(Class<?> c)
MetaDataFactorygetManagedClass in interface MetaDataFactorypublic boolean isAbstractMappingUniDirectional(OpenJPAConfiguration conf)
MetaDataDefaultsisAbstractMappingUniDirectional in interface MetaDataDefaultspublic boolean isNonDefaultMappingAllowed(OpenJPAConfiguration conf)
MetaDataDefaultsisNonDefaultMappingAllowed in interface MetaDataDefaultspublic Boolean isDefaultCascadePersistEnabled()
MetaDataDefaultsisDefaultCascadePersistEnabled in interface MetaDataDefaultspublic void setDefaultCascadePersistEnabled(Boolean bool)
setDefaultCascadePersistEnabled in interface MetaDataDefaultspublic String getDefaultSchema()
MetaDataDefaultsgetDefaultSchema in interface MetaDataDefaultspublic void setDefaultSchema(String schema)
MetaDataDefaultssetDefaultSchema in interface MetaDataDefaultsCopyright © 2006–2022 Apache Software Foundation. All rights reserved.