|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.solarmetric.kodo.meta.Extensions
|
+--com.solarmetric.kodo.meta.ClassMetaData
Contains JDO meta information about a persistent type. This metadata is available both at enhancement time and runtime.
The XML metadata for each JDO class must be obtainable as a resource
from the ClassResolver of the class, and must be named either
[class-name].jdo, if it applies only the given class, or, if
grouped with other classes in the same package, [package-name].jdo.
To group multiple packages together, place a file called system.jdo
at the top level of the CLASSPATH.
This implementation currently differs from the JDO 1.0 Specification specification in the following ways:
| Field Summary | |
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 int |
ID_NONE
Deprecated. Use ID_NONDURABLE instead. |
| Constructor Summary | |
(package private) |
ClassMetaData(Class type)
Constructor. |
| Method Summary | |
(package private) static void |
|
(package private) FieldMetaData |
addField(String name,
Class type)
|
(package private) void |
checkFinished()
|
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. |
Class |
getDescribedType()
Return the persistence capable class described by this metadata. |
Set |
getFetchGroup(FieldMetaData fmd)
Return an unmodifiable set of all fields in fmd's
fetch group. |
Set |
getFetchGroup(String name)
Return an unmodifiable set of all fields in the fetch group identified by name. |
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. |
int |
getIdentityType()
Return the type of JDO identity being used. |
static ClassMetaData |
getInstance(Class type)
Deprecated. |
static ClassMetaData |
getInstance(Class type,
ClassResolver resolver)
Factory method to obtain metadata for a given persistent type. |
static ClassMetaData |
getInstance(Class type,
ClassResolver loader,
JDOMetaDataParser parser,
boolean validate)
Factory method to obtain metadata for a given persistent type. |
static ClassMetaData |
getInstance(Class type,
PersistenceManagerImpl pm)
Factory method to obtain metadata for a given persistent type. |
Class |
getObjectIdClass()
Return the metadata-specified class to use for the object ID, or null if not specified. |
Class |
getPersistenceCapableSuperclass()
Return the persistence capable superclass of the described type, or null if the metadata did not specify one. |
static Class |
getPersistentType(Class type)
|
boolean |
hasSecondClassObjectFields()
|
protected static boolean |
isCached(Class type)
Return true if the metadata for type
has already been parsed. |
(package private) static boolean |
isDefaultPersistent(Class type)
|
boolean |
isDescribedType(Class check)
|
boolean |
isEnhanced()
Returns true if the class has been enhanced. |
boolean |
requiresExtent()
Return true if the type requires management via extent. |
(package private) void |
setIdentityType(int type)
|
(package private) void |
setObjectIdClass(Class type)
|
(package private) void |
setPersistenceCapableSuperclass(Class superType)
|
(package private) void |
setRequiresExtent(boolean extent)
|
String |
toString()
|
| Methods inherited from class com.solarmetric.kodo.meta.Extensions |
addExtension, addExtension, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, removeExtension, removeExtension |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ID_NONDURABLE
public static final int ID_NONE
public static final int ID_DATASTORE
public static final int ID_APPLICATION
| Constructor Detail |
ClassMetaData(Class type)
| Method Detail |
static void()
public static ClassMetaData getInstance(Class type)
Factory method to obtain metadata for a given persistent type. This can be used at either enhancement time or runtime; if used at enhancement time the metadata will be validated.
Because this method is not parameterized with a
PersistenceManager or ClassResolver, classes may not
be resolved according to the JDO specification. One of the
other getInstance methods should be used instead
of this, especially when used at runtime.
public static ClassMetaData getInstance(Class type,
PersistenceManagerImpl pm)
public static ClassMetaData getInstance(Class type,
ClassResolver resolver)
public static ClassMetaData getInstance(Class type,
ClassResolver loader,
JDOMetaDataParser parser,
boolean validate)
validate parameter, and subclasses of the standard
JDOMetaDataParser can be given to parse the XML if needed.
If given as null, the defualt parser will be used. This method is
mean for use primarily by tools that may need to have stricter control
over metadata parsing.protected static boolean isCached(Class type)
true if the metadata for type
has already been parsed.public final Class getDescribedType()
public final Class getPersistenceCapableSuperclass()
public final 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_NONE: identity managed by the data store to guarantee
uniqueness in the JVM, but not necessarily in the data store; this
is rarely usedID_DATASTORE.public final Class getObjectIdClass()
public final boolean requiresExtent()
PersistenceManager.getExtent(java.lang.Class, boolean) method cannot be
used for this class. Defaults to true.public FieldMetaData[] getFields()
public FieldMetaData[] getDeclaredFields()
public FieldMetaData getField(int index)
public FieldMetaData getDeclaredField(int index)
public FieldMetaData getField(String name)
public FieldMetaData getDeclaredField(String name)
public final boolean isEnhanced()
static final boolean isDefaultPersistent(Class type)
final void setPersistenceCapableSuperclass(Class superType)
final void setIdentityType(int type)
final void setObjectIdClass(Class type)
final void setRequiresExtent(boolean extent)
FieldMetaData addField(String name,
Class type)
final void checkFinished()
public String toString()
toString in class Objectpublic final boolean hasSecondClassObjectFields()
public final Set getFetchGroup(FieldMetaData fmd)
fmd's
fetch group. This may include fields in subclasses. If there
is no fetch group corresponding to fmd, return an
empty set.public final Set getFetchGroup(String name)
name. This may include fields in
subclasses. If there is no fetch group corresponding to
name, return an empty set.public static Class getPersistentType(Class type)
public boolean isDescribedType(Class check)
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||