|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Contains JDO meta information about a persistent type. This metadata is available both at enhancement time and runtime.
Along with simple bean methods for getting basic attributes of
the metadata, the following methods can be used before resolve()
has
been called: getDeclaredField(int)
,
getDeclaredField(String)
, and getDeclaredFields()
. If
the superclass metadata has been set or this is a base class,
getPrimaryKeyFields()
can also be used before resolve.
Field Summary | |
static String |
DATA_CACHE
Extension key used to indicate that this class should be stored in a named L2 cache. |
static String |
DATA_CACHE_TIMEOUT
Extension key used to set an L2 cache timeout value for the class. |
static int |
DETACH_FALSE
This class is not detachable. |
static String |
DETACH_OID_FIELD
Extension to indicate which field will be used to store the stringified object id. |
static int |
DETACH_SERIALIZE
This class is detachable, and automatically detaches on serialize. |
static String |
DETACH_STATE_FIELD
Extension to indicate which field will be used to store the version object. |
static int |
DETACH_TRUE
This class is detachable. |
static String |
DETACHABLE
Extension used to mark this class as being capable of being detached. |
static String[] |
EXTENSION_KEYS
The list of all the recognized extension keys. |
static int |
ID_APPLICATION
Constant representing the 'application' JDO identity type. |
static int |
ID_DATASTORE
Constant representing the 'datastore' JDO identity type. |
static int |
ID_NONDURABLE
Constant representing the 'nondurable' JDO identity type. |
static String |
LOCK_GROUPS
Extension key that explicitly lists lock group names used by subclasses of a least-derived type. |
static String |
SUBCLASS_FETCH_MODE
Extension key used to specify whether the subclass fetch mode for this type. |
static int |
VALIDATE_ALL
Constant to validate all metadata. |
static int |
VALIDATE_NONE
Constant to not validate any metadata. |
static int |
VALIDATE_NORESOLVE
Constant to not even resolve metadata; useful when building up new metadata in dev tools. |
static int |
VALIDATE_RUNTIME
Runtime validation. |
static int |
VALIDATE_UNENHANCED
Constant to validate only metadata for unenhanced classes. |
Method Summary | |
void |
addDeclaredField(FieldMetaData field)
Add a persistent or transactional field to this class. |
DataCache |
getDataCache()
Return the data cache for this class, or null if it is not cachable. |
String |
getDataCacheName()
Return the value of the DATA_CACHE extension. |
int |
getDataCacheTimeout()
Return the value of the DATA_CACHE_TIMEOUT extension, or
the system default if no extension is present. |
FieldMetaData |
getDeclaredField(int index)
Return the metadata for the persistent or transactional field with the given relative index. |
FieldMetaData |
getDeclaredField(String name)
Return the metadata for the persistent or transactional field with the given name, without including superclass fields. |
FieldMetaData[] |
getDeclaredFields()
Return only the fields for this class, without superclass fields. |
FieldMetaData[] |
getDeclaredUnmanagedFields()
Return any fields that were added as non-managed. |
FieldMetaData[] |
getDefaultFetchGroupFields()
Return the list of fields in the default fetch group, including superclass fields, or an empty array if none. |
Class |
getDescribedType()
Return the persistence capable class described by this metadata. |
int |
getDetachable()
The detach constant for this class. |
String |
getDetachObjectId()
The name of the detach object id field, or null if none. |
Field |
getDetachObjectIdField()
Return the detach object id field, or null if none. |
String |
getDetachState()
The name of the detach state field, or null if none. |
Field |
getDetachStateField()
Return the detach state field, or null if none. |
FieldMetaData |
getField(int index)
Return the metadata for the persistent or transactional field with the given absolute index. |
FieldMetaData |
getField(String name)
Return the metadata for the persistent or transactional field with the given name. |
FieldMetaData[] |
getFields()
Return all field metadatas, including superclass fields. |
FieldMetaData[] |
getFieldsInListingOrder()
Return all field metadatas, including superclass fields, in the order that they are encountered during parsing. |
int |
getIdentityType()
Return the type of JDO identity being used. |
ClassMetaData |
getLeastDerivedMetaData()
Return the metadata representing the least-derived persistence-capable type in this class hierarchy. |
Class |
getObjectIdClass()
Return the metadata-specified class to use for the object ID, or null if not specified. |
Class[] |
getPCSubclasses()
Return the known persistence capable subclasses of the described type, or empty array if none. |
ClassMetaData[] |
getPCSubclassMetaDatas()
Return the metadata for the known persistence capable subclasses of the described type, or empty array if none. |
Class |
getPCSuperclass()
Return the persistence capable superclass of the described type, or null if the metadata did not specify one. |
ClassMetaData |
getPCSuperclassMetaData()
Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one. |
ClassLoader |
getPMClassLoader()
The class persistence manager loader used when parsing this metadata. |
FieldMetaData[] |
getPrimaryKeyFields()
Return primary key fields, or empty array if none. |
JDOMetaDataRepository |
getRepository()
Return the owning repository. |
boolean |
getRequiresExtent()
Return true if the type requires management via extent. |
File |
getSourceFile()
Return the source file the metadata was parsed from, if any. |
int |
getSubclassFetchMode()
The subclass fetch mode, as one of the eager constants in FetchConfiguration . |
int |
getValidate()
Return the validation level. |
void |
invalidateResolve()
For implementation use. |
boolean |
isEnhanced()
Returns true if the class has been enhanced. |
boolean |
isInstanceCallbacks()
Return true if the class implements InstanceCallbacks . |
boolean |
isMemberField(String field)
Return whether the given name represents a member field of this class, including superclass fields. |
boolean |
isResolved()
For implementation use. |
boolean |
isSingleFieldIdentity()
Return true if using single field identity. |
boolean |
removeDeclaredField(FieldMetaData field)
Remove the given field from management. |
void |
resolve()
For implementation use. |
void |
setDataCacheName(String cacheName)
Set the value of the DATA_CACHE extension. |
void |
setDataCacheTimeout(int timeout)
Set the value of the DATA_CACHE_TIMEOUT standard extension. |
void |
setDescribedType(Class type)
Return the persistence capable class described by this metadata. |
void |
setDetachable(int detachable)
The detach constant for this class. |
void |
setDetachObjectId(String field)
The name of the detach object id field, or null if none. |
void |
setDetachState(String field)
The name of the detach state field, or null if none. |
void |
setIdentityType(int type)
Set the type of JDO identity used by this class. |
void |
setObjectIdClass(Class cls)
Set the metadata-specified class to use for the object ID. |
void |
setPCSuperclass(Class pc)
Set the persistence capable superclass of the described type. |
void |
setPCSuperclassMetaData(ClassMetaData meta)
Set the metadata for this class' superclass. |
void |
setPMClassLoader(ClassLoader loader)
The class persistence manager loader used when parsing this metadata. |
void |
setRepository(JDOMetaDataRepository repos)
Set the owning repository. |
void |
setRequiresExtent(boolean req)
Set whether the type requires extent management. |
void |
setSingleFieldIdentity(boolean single)
Set whether this class should use single field identity. |
void |
setSourceFile(File file)
Set the source file the metadata was parsed from. |
void |
setSubclassFetchMode(int mode)
The subclass fetch mode, as one of the eager constants in FetchConfiguration . |
void |
setValidate(int validate)
Set the validation level. |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface com.solarmetric.meta.SourceTracker |
getTrackedResourceName |
Methods inherited from interface kodo.meta.Commentable |
getComments |
Field Detail |
public static final int ID_NONDURABLE
public static final int ID_DATASTORE
public static final int ID_APPLICATION
public static final int VALIDATE_ALL
public static final int VALIDATE_UNENHANCED
public static final int VALIDATE_NONE
public static final int VALIDATE_NORESOLVE
public static final int VALIDATE_RUNTIME
public static final int DETACH_FALSE
public static final int DETACH_TRUE
public static final int DETACH_SERIALIZE
public static final String DATA_CACHE
public static final String DATA_CACHE_TIMEOUT
public static final String DETACHABLE
public static final String DETACH_OID_FIELD
public static final String DETACH_STATE_FIELD
public static final String LOCK_GROUPS
lock-groups
.public static final String SUBCLASS_FETCH_MODE
kodo.SubclassFetchMode
property if no superclass.public static final String[] EXTENSION_KEYS
Method Detail |
public ClassLoader getPMClassLoader()
public void setPMClassLoader(ClassLoader loader)
public int getValidate()
public void setValidate(int validate)
public JDOMetaDataRepository getRepository()
public void setRepository(JDOMetaDataRepository repos)
public File getSourceFile()
getSourceFile
in interface SourceTracker
public void setSourceFile(File file)
public Class getDescribedType()
public void setDescribedType(Class type)
public Class getPCSuperclass()
public void setPCSuperclass(Class pc)
public ClassMetaData getPCSuperclassMetaData()
public void setPCSuperclassMetaData(ClassMetaData meta)
public ClassMetaData getLeastDerivedMetaData()
this
.public Class[] getPCSubclasses()
public ClassMetaData[] getPCSubclassMetaDatas()
public int getIdentityType()
ID_DATASTORE
: identity managed by the data store and
independent of the fields of the instanceID_APPLICATION
: identity managed by the application and
defined by one or more fields of the instanceID_NONDURABLE
: identity managed by the implementation to
guarantee uniqueness in the JVM, but not necessarily in the data
store; this is rarely usedID_DATASTORE
.public void setIdentityType(int type)
getIdentityType()
public Class getObjectIdClass()
public void setObjectIdClass(Class cls)
public void setSingleFieldIdentity(boolean single)
public boolean isSingleFieldIdentity()
public boolean getRequiresExtent()
PersistenceManager.getExtent(java.lang.Class, boolean)
method cannot be
used for this class. Defaults to true.public void setRequiresExtent(boolean req)
public FieldMetaData[] getFields()
public FieldMetaData[] getFieldsInListingOrder()
FieldMetaData.getIndex()
, but
rather is related to FieldMetaData.getListingIndex()
.public FieldMetaData[] getDeclaredFields()
public FieldMetaData[] getPrimaryKeyFields()
public FieldMetaData[] getDefaultFetchGroupFields()
public FieldMetaData getField(int index)
public FieldMetaData getDeclaredField(int index)
public FieldMetaData getField(String name)
public FieldMetaData getDeclaredField(String name)
public FieldMetaData[] getDeclaredUnmanagedFields()
public boolean isMemberField(String field)
public void addDeclaredField(FieldMetaData field)
public boolean removeDeclaredField(FieldMetaData field)
public boolean isEnhanced()
public boolean isInstanceCallbacks()
InstanceCallbacks
.public String getDataCacheName()
DATA_CACHE
extension.public void setDataCacheName(String cacheName)
DATA_CACHE
extension. Use null to
remove the extension.public int getDataCacheTimeout()
DATA_CACHE_TIMEOUT
extension, or
the system default if no extension is present.public void setDataCacheTimeout(int timeout)
DATA_CACHE_TIMEOUT
standard extension.
Use Integer.MAX_VALUE
to remove the extension.public DataCache getDataCache()
public int getDetachable()
public void setDetachable(int detachable)
public String getDetachObjectId()
public void setDetachObjectId(String field)
public Field getDetachObjectIdField()
public String getDetachState()
public void setDetachState(String field)
public Field getDetachStateField()
public int getSubclassFetchMode()
FetchConfiguration
.public void setSubclassFetchMode(int mode)
FetchConfiguration
.public boolean isResolved()
public void invalidateResolve()
public void resolve()
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |