|
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 |
Holds metadata on a particular field.
Field metadata can be created without attaching it to class metadata,
or without attaching its class metadata to a repository. However, methods
that would require access to metadata for related classes will throw
an exception. Also, the field type code may incorrectly remain
TYPE_OBJECT
when the type of the field is actually
persistent (without access to other metadata, there is no way to tell).
Field Summary | |
static String |
DEPENDENT
Extension key used to mark first class object fields that should be deleted when the owning object is deleted. |
static String |
EAGER_FETCH_MODE
Extension key used to mark the eager fetch mode for this field. |
static String |
ELEMENT_DEPENDENT
Extension key used to mark first class object elements that should be deleted when the owning object is deleted. |
static String |
ELEMENT_TYPE
Extension key used to indicate the type of elements held by a collection field declared to be of a generic interface or object type. |
static String[] |
EXTENSION_KEYS
The list of all the recognized extension keys. |
static String |
EXTERNAL_VALUES
Extension key used to declare constant external transformation values. |
static String |
EXTERNALIZER
Extension key used to name the externalizer method for transforming the value of this field into a supported type. |
static String |
FACTORY
Extension key used to name the factory method for transforming the externalized value back to the value of this field. |
static String |
FETCH_GROUP
Extension key used to name a custom fetch group for a field. |
static String |
INVERSE_LOGICAL
Extension key used to mark that this field should be treated as a logical inverse of the named field, and vice versa. |
static String |
INVERSE_OWNER
Extension key used to mark the opposite side of a bi-directional relationship if the opposite side is the one managing data storage for the relationship. |
static String |
KEY_DEPENDENT
Extension key used to mark first class object keys that should be deleted when the owning object is deleted. |
static String |
KEY_TYPE
Extension key used to indicate the type of keys held by a map field declared to be of a generic interface or object type. |
static String |
LOCK_GROUP
Extension key used to name a lock group for a field. |
static String |
LOCK_GROUP_DEFAULT
Name of the default lock group. |
static String |
LOCK_GROUP_NONE
Name of the null lock group. |
static String |
LRS
Extension key used to mark containers that should use special large result set handlers. |
static int |
MANAGE_NONE
Constant specifying the management level of a field. |
static int |
MANAGE_PERSISTENT
Constant specifying the management level of a field. |
static int |
MANAGE_TRANSACTIONAL
Constant specifying the management level of a field. |
static int |
NULL_DEFAULT
Constant specifying to use a datastore default value to persist null values in object fields. |
static int |
NULL_EXCEPTION
Constant specifying to throw an exception when attempting to persist null values in object fields. |
static int |
NULL_NONE
Constant specifying to use a datastore null to persist null values in object fields. |
static int |
NULL_UNSET
Constant specifying that no null-value was given. |
static String |
SEQUENCE_ASSIGNED
Extension key indicating whether this field should be assigned a value from a sequence. |
static String |
TYPE
Extension key used to indicate the type of values held by a field declared to be of a generic interface or object type. |
static String |
VALUE_DEPENDENT
Extension key used to mark first class object values that should be deleted when the owning object is deleted. |
static String |
VALUE_TYPE
Extension key used to indicate the type of values held by a map field declared to be of a generic interface or object type. |
Fields inherited from interface kodo.meta.JDOTypes |
TYPE_ARRAY, TYPE_BIGDECIMAL, TYPE_BIGINTEGER, TYPE_BOOLEAN, TYPE_BOOLEAN_OBJ, TYPE_BYTE, TYPE_BYTE_OBJ, TYPE_CHAR, TYPE_CHAR_OBJ, TYPE_COLLECTION, TYPE_DATE, TYPE_DOUBLE, TYPE_DOUBLE_OBJ, TYPE_FCO, TYPE_FLOAT, TYPE_FLOAT_OBJ, TYPE_INT, TYPE_INT_OBJ, TYPE_LOCALE, TYPE_LONG, TYPE_LONG_OBJ, TYPE_MAP, TYPE_NUMBER, TYPE_OBJECT, TYPE_PC_OBJECT, TYPE_SHORT, TYPE_SHORT_OBJ, TYPE_STRING |
Method Summary | |
Comparator |
getComparator()
The comparator type used by the field, or null if none. |
Class |
getDeclaredElementType()
Return the declared class of the described field. |
int |
getDeclaredElementTypeCode()
Return the declared type code of the described field. |
ClassMetaData |
getDeclaredElementTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
int |
getDeclaredIndex()
Return the relative index of this persistent/transactional field. |
Class |
getDeclaredKeyType()
Return the declared class of the described field. |
int |
getDeclaredKeyTypeCode()
Return the declared class of the described field. |
ClassMetaData |
getDeclaredKeyTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
int |
getDeclaredPrimaryKeyIndex()
Return the primary key index of this persistent/transactional field, or -1 if not a primary key. |
Class |
getDeclaredType()
Return the declared class of the described field. |
int |
getDeclaredTypeCode()
Return the declared type code of the described field. |
ClassMetaData |
getDeclaredTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
int |
getEagerFetchMode()
The eager fetch mode, as one of the eager constants in FetchConfiguration . |
Class |
getElementType()
Return the type of objects stored in the array/collection/map; defaults to Object if not specified, or null if this field
does not represent an array/collection/map type. |
int |
getElementTypeCode()
Return the type code of objects stored in the array/collection/map, or -1 if not an array/collection/map. |
ClassMetaData |
getElementTypeMetaData()
Return metadata for the element type, or null if not persistent. |
String |
getElementTypeName()
The value of the ELEMENT_TYPE or VALUE_TYPE
extension key. |
String |
getExternalizer()
The name of this field's externalizer, or null if none. |
Object |
getExternalValue(Object fieldVal,
KodoPersistenceManager pm)
Convert the given field value to its external value through the provided externalizer, or return the value as-is if no externalizer. |
String |
getExternalValues()
Properties string mapping field values to external values. |
String |
getFactory()
The name of this field's factory, or null if none. |
String |
getFetchGroup()
Return the name of the custom fetch group for this field, or null if none. |
byte |
getFieldFlag()
Returns the JDO flag type for this field. |
Object |
getFieldValue(Object externalVal,
KodoPersistenceManager pm)
Return the result of passing the given external value through the factory to get the field value. |
String |
getFullName()
Return the full name of the described field, in the form <package.to.Class>.<field> . |
int |
getIndex()
Return the absolute index of this persistent/transactional field. |
String |
getInverseLogical()
Return the field marked as a logical inverse via the #INVERSE_LOGiCAL extension key. |
FieldMetaData[] |
getInverseMetaDatas()
Return all fields to which this field owns or is owned in the inverse, or has simulated inverse behavior. |
String |
getInverseOwner()
Return the field marked as an inverse via the INVERSE_OWNER
extension key. |
FieldMetaData |
getInverseOwnerMetaData()
Return the metadata for the field's inverse. |
Class |
getKeyType()
The type of objects used as keys in the map; defaults to Object if not specified, or null if this field is not a map. |
int |
getKeyTypeCode()
The type code of objects used as keys in the map. |
ClassMetaData |
getKeyTypeMetaData()
Return metadata for the key type, or null if not persistent. |
String |
getKeyTypeName()
The value of the KEY_TYPE extension key. |
int |
getListingIndex()
Return the index in which this field was listed in the JDO metadata. |
String |
getLockGroup()
Return the name of the lock fetch group for this field, or null if none. |
int |
getManagement()
Return the management level for the field. |
String |
getName()
Return the name of the described field. |
int |
getNullValue()
How the data store should treat null values for this field: NULL_NONE : leave null values as null in the data store
NULL_EXCEPTION : throw an exception if this field is null
at commit
NULL_DEFAULT : use the database default if this field is
null at commit
Defaults to NULL_NONE . |
ClassMetaData |
getOwner()
Return the owning metadata for this field. |
int |
getPrimaryKeyIndex()
Returns the primary key index for the inheritance hierarchy. |
Class |
getProxyType()
The type this field was initialized with, and therefore the type to use for proxies when loading data into this field. |
Class |
getType()
Return the class of the described field. |
int |
getTypeCode()
Return the type code of the described field. |
ClassMetaData |
getTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
String |
getTypeName()
The value of the TYPE extension key. |
void |
invalidateResolve()
For implementation use. |
boolean |
isDefaultFetchGroupExplicit()
Return whether the field explicitly declares its default fetch group status. |
boolean |
isDependent()
Return true if the DEPENDENT extension key is
true and the field is a first class object. |
boolean |
isElementDependent()
Return true if the ELEMENT_DEPENDENT /VALUE_DEPENDENT
extension key is true and the element/value contains first class
objects. |
boolean |
isElementEmbedded()
A hint to the JDO implementation on whether the arary/collection/map values should be stored as part of the instance rather than as their own instances in the data store. |
boolean |
isEmbedded()
This attribute is a hint to the JDO implementation to store this field in the same instance as the class, rather than as a separate datastore instance. |
boolean |
isExplicit()
Return true if the field is explicitly declared in the metadata. |
boolean |
isExternalized()
Whether the field is externalized. |
boolean |
isInDefaultFetchGroup()
Return true if the field should be fetched at once along with all other default fetch group fields, rather than individually. |
boolean |
isKeyDependent()
Return true if the KEY_DEPENDENT extension key
is true and the key contains first class objects. |
boolean |
isKeyEmbedded()
A hint to the JDO implementation on whether the map keys should be stored as part of the instance rather than as their own instances in the data store. |
boolean |
isLRS()
Whether this field is backed by a large result set. |
boolean |
isPrimaryKey()
If true, the field was specified in the meta data to be a primary key field. |
boolean |
isResolved()
Return whether this field has been resolved. |
boolean |
isSequenceAssigned()
Set whether this field (of long, int, short or wrapper type) should have a value assigned to it on flush. |
boolean |
isTransient()
Return whether this is a transient field. |
void |
resolve()
For implementation use. |
void |
setComparator(Comparator comp)
The comparator type used by the field, or null if none. |
void |
setDeclaredElementType(Class cls)
Set the element class for this array/collection/map field. |
void |
setDeclaredElementTypeCode(int type)
Set the element type code for the described field. |
void |
setDeclaredIndex(int index)
Used by ClassMetaData to set index. |
void |
setDeclaredKeyType(Class cls)
Set the key type for this map field. |
void |
setDeclaredKeyTypeCode(int type)
Set the key type code for the described field. |
void |
setDeclaredPrimaryKeyIndex(int index)
Used by ClassMetaData to set index. |
void |
setDeclaredType(Class type)
Set the class of the described field. |
void |
setDeclaredTypeCode(int type)
Set the type code for the described field. |
void |
setDependent(boolean cascade)
Set the value of the DEPENDENT standard extension. |
void |
setEagerFetchMode(int mode)
The eager fetch mode, as one of the eager constants in FetchConfiguration . |
void |
setElementDependent(boolean cascade)
Set the value of the ELEMENT_DEPENDENT extension key. |
void |
setElementEmbedded(boolean embedded)
Set whether the elements should be embedded. |
void |
setElementTypeName(String type)
The value of the ELEMENT_TYPE or VALUE_TYPE
extension key. |
void |
setEmbedded(boolean embedded)
Set the embedded value for the field. |
void |
setExplicit(boolean explicit)
Set whether the field was explicitly declared in the metadata. |
void |
setExternalizer(String externalizer)
The name of this field's externalizer, or null if none. |
void |
setExternalValues(String values)
Properties string mapping field values to external values. |
void |
setFactory(String factory)
The name of this field's factory, or null if none. |
void |
setFetchGroup(String fg)
Set the name of the custom fetch group for this field. |
void |
setInDefaultFetchGroup(boolean dfg)
Set whether the field is in the default fetch group. |
void |
setIndex(int index)
Used by ClassMetaData to set index. |
void |
setInverseLogical(String inverse)
Set the field marked as a logical inverse via the INVERSE_LOGICAL extension key. |
void |
setInverseOwner(String inverse)
Set the field marked as an inverse via the INVERSE_OWNER
extension key. |
void |
setKeyDependent(boolean cascade)
Set the value of the KEY_DEPENDENT extension key. |
void |
setKeyEmbedded(boolean embedded)
Set whether the keys are embedded. |
void |
setKeyTypeName(String type)
The value of the KEY_TYPE extension key. |
void |
setListingIndex(int index)
Set the index in which this field was listed in the JDO metadata. |
void |
setLockGroup(String lg)
Set the name of the lock group for this field. |
void |
setLRS(boolean lrs)
Whether this field is backed by a large result set. |
void |
setManagement(int manage)
Set the management level for the field. |
void |
setName(String name)
Set the name of the described field. |
void |
setNullValue(int nullValue)
Set the null action for the field. |
void |
setOwner(ClassMetaData owner)
Set the owning metadata for this field. |
void |
setPrimaryKey(boolean primKey)
Set whether this is a primary key field. |
void |
setProxyType(Class type)
The type this field was initialized with, and therefore the type to use for proxies when loading data into this field. |
void |
setSequenceAssigned(boolean seqAssign)
Set whether this field (of long, int, short or wrapper type) should have a value assigned to it on flush. |
void |
setTransient(boolean trans)
Set whether this is a transient field. |
void |
setTypeName(String type)
The value of the TYPE extension key. |
Boolean |
usesImplData()
Return whether this field uses impl data in conjunction with standard field data when acting on a KodoStateManager . |
boolean |
usesIntermediate()
Return whether this field uses intermediate data when loading/storing information through a KodoStateManager . |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface kodo.meta.Commentable |
getComments |
Field Detail |
public static final int NULL_UNSET
public static final int NULL_NONE
public static final int NULL_DEFAULT
public static final int NULL_EXCEPTION
public static final int MANAGE_PERSISTENT
public static final int MANAGE_TRANSACTIONAL
public static final int MANAGE_NONE
public static final String DEPENDENT
public static final String ELEMENT_DEPENDENT
public static final String KEY_DEPENDENT
public static final String VALUE_DEPENDENT
public static final String INVERSE_OWNER
public static final String INVERSE_LOGICAL
public static final String TYPE
PersistenceCapable
to indicate that the field
holds some user-defined persistence-capable value. Set the extension
to Object
to indicate that the type being held by the
field is not persistence-capable (useful for interfaces, which Kodo
assumes are persistence-capable by default). Finally, set the
extension to the full class name of a persistence-capable type to
indicate that the field will actually hold a value of that type, even
if it is declared as a generic object or interface field.public static final String ELEMENT_TYPE
TYPE
public static final String VALUE_TYPE
TYPE
public static final String KEY_TYPE
TYPE
public static final String EAGER_FETCH_MODE
public static final String FETCH_GROUP
public static final String LOCK_GROUP
public static final String LOCK_GROUP_DEFAULT
public static final String LOCK_GROUP_NONE
public static final String EXTERNAL_VALUES
public static final String EXTERNALIZER
public static final String FACTORY
public static final String LRS
true
or false
.
Defaults to false.public static final String SEQUENCE_ASSIGNED
false
.public static final String[] EXTENSION_KEYS
Method Detail |
public ClassMetaData getOwner()
public void setOwner(ClassMetaData owner)
public String getName()
public void setName(String name)
public String getFullName()
<package.to.Class>.<field>
.public Class getType()
public int getTypeCode()
public ClassMetaData getTypeMetaData()
public Class getDeclaredType()
getType()
if the user indicates
a different type with the #PC_CLASS
extension or an
EXTERNALIZER
.public void setDeclaredType(Class type)
public int getDeclaredTypeCode()
getTypeCode()
if the user indicates
a different type with the #PC_CLASS
extension or an
EXTERNALIZER
.public void setDeclaredTypeCode(int type)
public ClassMetaData getDeclaredTypeMetaData()
public Class getProxyType()
public void setProxyType(Class type)
public boolean isTransient()
public void setTransient(boolean trans)
public int getIndex()
public void setIndex(int index)
ClassMetaData
to set index.public int getDeclaredIndex()
public void setDeclaredIndex(int index)
ClassMetaData
to set index.public int getListingIndex()
-1
if this field was not listed
in the metadata. Note that this index is per-class, and is not
unique within the class hierarchy.public void setListingIndex(int index)
public int getDeclaredPrimaryKeyIndex()
getPrimaryKeyIndex()
.public void setDeclaredPrimaryKeyIndex(int index)
ClassMetaData
to set index.public int getPrimaryKeyIndex()
public int getManagement()
MANAGE_PERSISTENT
: the field is persistentMANAGE_TRANSACTIONAL
: the field is transactional but not
persistentMANAGE_NONE
: the field is not managedMANAGE_PERSISTENT
.public void setManagement(int manage)
getManagement()
public boolean isPrimaryKey()
public void setPrimaryKey(boolean primKey)
public byte getFieldFlag()
PersistenceCapable
interface.public int getNullValue()
NULL_NONE
: leave null values as null in the data storeNULL_EXCEPTION
: throw an exception if this field is null
at commitNULL_DEFAULT
: use the database default if this field is
null at commitNULL_NONE
.public void setNullValue(int nullValue)
getNullValue()
public boolean isExplicit()
public void setExplicit(boolean explicit)
public boolean isInDefaultFetchGroup()
public void setInDefaultFetchGroup(boolean dfg)
public boolean isDefaultFetchGroupExplicit()
public boolean isEmbedded()
public void setEmbedded(boolean embedded)
public Class getElementType()
Object
if not specified, or null if this field
does not represent an array/collection/map type.public int getElementTypeCode()
public ClassMetaData getElementTypeMetaData()
public Class getDeclaredElementType()
getElementType()
if the user indicates
a different type with the #ELEMENT_PC_CLASS
extension or
the ELEMENT_TYPE
extension.public int getDeclaredElementTypeCode()
getElementTypeCode()
if the user
indicates a different type with the #ELEMENT_PC_CLASS
extension
or the ELEMENT_TYPE
extension.public void setDeclaredElementType(Class cls)
public void setDeclaredElementTypeCode(int type)
public ClassMetaData getDeclaredElementTypeMetaData()
public boolean isElementEmbedded()
public void setElementEmbedded(boolean embedded)
public Class getKeyType()
Object
if not specified, or null if this field is not a map.public int getKeyTypeCode()
public ClassMetaData getKeyTypeMetaData()
public Class getDeclaredKeyType()
getKeyType()
if the user indicates
a different type with the #KEY_PC_CLASS
extension or the
KEY_TYPE
extension.public void setDeclaredKeyType(Class cls)
public int getDeclaredKeyTypeCode()
getKeyTypeCode()
if the user indicates
a different type with the #KEY_PC_CLASS
extension or the
KEY_TYPE
extension.public void setDeclaredKeyTypeCode(int type)
public ClassMetaData getDeclaredKeyTypeMetaData()
public boolean isKeyEmbedded()
public void setKeyEmbedded(boolean embedded)
public Comparator getComparator()
public void setComparator(Comparator comp)
public String getInverseOwner()
INVERSE_OWNER
extension key.public void setInverseOwner(String inverse)
INVERSE_OWNER
extension key.public FieldMetaData getInverseOwnerMetaData()
public String getInverseLogical()
#INVERSE_LOGiCAL
extension key.public void setInverseLogical(String inverse)
INVERSE_LOGICAL
extension key.public FieldMetaData[] getInverseMetaDatas()
public boolean isDependent()
DEPENDENT
extension key is
true and the field is a first class object.public void setDependent(boolean cascade)
DEPENDENT
standard extension.public boolean isElementDependent()
ELEMENT_DEPENDENT
/VALUE_DEPENDENT
extension key is true and the element/value contains first class
objects.public void setElementDependent(boolean cascade)
ELEMENT_DEPENDENT
extension key.public boolean isKeyDependent()
KEY_DEPENDENT
extension key
is true and the key contains first class objects.public void setKeyDependent(boolean cascade)
KEY_DEPENDENT
extension key.public boolean isLRS()
public void setLRS(boolean lrs)
public String getTypeName()
TYPE
extension key.public void setTypeName(String type)
TYPE
extension key.public String getElementTypeName()
ELEMENT_TYPE
or VALUE_TYPE
extension key.public void setElementTypeName(String type)
ELEMENT_TYPE
or VALUE_TYPE
extension key.public String getKeyTypeName()
KEY_TYPE
extension key.public void setKeyTypeName(String type)
KEY_TYPE
extension key.public int getEagerFetchMode()
FetchConfiguration
.public void setEagerFetchMode(int mode)
FetchConfiguration
.public String getFetchGroup()
public void setFetchGroup(String fg)
public String getLockGroup()
public void setLockGroup(String lg)
public boolean isExternalized()
public Object getExternalValue(Object fieldVal, KodoPersistenceManager pm)
public Object getFieldValue(Object externalVal, KodoPersistenceManager pm)
public String getExternalizer()
public void setExternalizer(String externalizer)
public String getFactory()
public void setFactory(String factory)
public String getExternalValues()
public void setExternalValues(String values)
public void setSequenceAssigned(boolean seqAssign)
public boolean isSequenceAssigned()
public boolean isResolved()
public void invalidateResolve()
public void resolve()
public boolean usesIntermediate()
KodoStateManager
.KodoStateManager.setIntermediate(int,Object)
public Boolean usesImplData()
KodoStateManager
.Boolean.FALSE
if this field does not use impl data,
Boolean.TRUE
if this field uses non-cachable impl
data, or null
if this field uses impl data that
should be cached across instancesKodoStateManager.setImplData(int,Object)
|
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 |