SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

com.solarmetric.kodo.meta
Class FieldMetaData

java.lang.Object
  |
  +--com.solarmetric.kodo.meta.Extensions
        |
        +--com.solarmetric.kodo.meta.FieldMetaData
All Implemented Interfaces:
Comparable

public class FieldMetaData
extends Extensions
implements Comparable

Holds metadata on a particular persistent or transactional field. Instances are not kept for non-persistent, non-transactional fields of JDO instances.


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 ELEMENT_DEPENDENT
          Extension key used to mark first class object elements that should be deleted when the owning object is deleted.
static String KEY_DEPENDENT
          Extension key used to mark first class object keys that should be deleted when the owning object is deleted.
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 TYPE_ARRAY
           
static int TYPE_BIGDECIMAL
           
static int TYPE_BIGINTEGER
           
static int TYPE_BOOLEAN
           
static int TYPE_BOOLEAN_OBJ
           
static int TYPE_BYTE
           
static int TYPE_BYTE_OBJ
           
static int TYPE_CHAR
           
static int TYPE_CHAR_OBJ
           
static int TYPE_COLLECTION
           
static int TYPE_DATE
           
static int TYPE_DOUBLE
           
static int TYPE_DOUBLE_OBJ
           
static int TYPE_FCO
           
static int TYPE_FLOAT
           
static int TYPE_FLOAT_OBJ
           
static int TYPE_INT
           
static int TYPE_INT_OBJ
           
static int TYPE_INTERFACE
           
static int TYPE_LOCALE
           
static int TYPE_LONG
           
static int TYPE_LONG_OBJ
           
static int TYPE_MAP
           
static int TYPE_OBJECT
           
static int TYPE_SHORT
           
static int TYPE_SHORT_OBJ
           
static int TYPE_STRING
           
static String VALUE_DEPENDENT
          Extension key used to mark first class object values that should be deleted when the owning object is deleted.
 
Method Summary
 int compareTo(Object other)
          FieldMetaData orders itself on field name.
 int getDeclaredIndex()
          Return the relative index of this persistent/transactional field.
 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.
 byte getFieldFlag()
          Returns the JDO flag type for this field.
 int getIndex()
          Return the absolute index of this persistent/transactional field.
 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.
 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.
 Class getType()
          Return the class of the described field.
 int getTypeCode()
          Return the type code of the described field.
 boolean isDependent()
           
 boolean isElementDependent()
           
 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 isEmbeddedElement()
          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 isEmbeddedKey()
          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 isExplicit()
          Return true if the field is explicitly marked persistent or transactional in the metadata.
 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()
           
 boolean isPersistent()
          If false, the field is transactional but not persistent.
 boolean isPrimaryKey()
          If true, the field was specified in the meta data to be a primary key field.
 void setDependent(boolean cascade)
           
 void setElementDependent(boolean cascade)
           
 void setKeyDependent(boolean cascade)
           
 
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, toString, wait, wait, wait
 

Field Detail

NULL_NONE

public static final int NULL_NONE
Constant specifying to use a datastore null to persist null values in object fields.

NULL_DEFAULT

public static final int NULL_DEFAULT
Constant specifying to use a datastore default value to persist null values in object fields.

NULL_EXCEPTION

public static final int NULL_EXCEPTION
Constant specifying to throw an exception when attempting to persist null values in object fields.

DEPENDENT

public static final String DEPENDENT
Extension key used to mark first class object fields that should be deleted when the owning object is deleted.

ELEMENT_DEPENDENT

public static final String ELEMENT_DEPENDENT
Extension key used to mark first class object elements that should be deleted when the owning object is deleted.

KEY_DEPENDENT

public static final String KEY_DEPENDENT
Extension key used to mark first class object keys that should be deleted when the owning object is deleted.

VALUE_DEPENDENT

public static final String VALUE_DEPENDENT
Extension key used to mark first class object values that should be deleted when the owning object is deleted.

TYPE_BOOLEAN

public static final int TYPE_BOOLEAN

TYPE_BYTE

public static final int TYPE_BYTE

TYPE_CHAR

public static final int TYPE_CHAR

TYPE_DOUBLE

public static final int TYPE_DOUBLE

TYPE_FLOAT

public static final int TYPE_FLOAT

TYPE_INT

public static final int TYPE_INT

TYPE_LONG

public static final int TYPE_LONG

TYPE_SHORT

public static final int TYPE_SHORT

TYPE_STRING

public static final int TYPE_STRING

TYPE_OBJECT

public static final int TYPE_OBJECT

TYPE_ARRAY

public static final int TYPE_ARRAY

TYPE_COLLECTION

public static final int TYPE_COLLECTION

TYPE_MAP

public static final int TYPE_MAP

TYPE_DATE

public static final int TYPE_DATE

TYPE_FCO

public static final int TYPE_FCO

TYPE_BOOLEAN_OBJ

public static final int TYPE_BOOLEAN_OBJ

TYPE_BYTE_OBJ

public static final int TYPE_BYTE_OBJ

TYPE_CHAR_OBJ

public static final int TYPE_CHAR_OBJ

TYPE_DOUBLE_OBJ

public static final int TYPE_DOUBLE_OBJ

TYPE_FLOAT_OBJ

public static final int TYPE_FLOAT_OBJ

TYPE_INT_OBJ

public static final int TYPE_INT_OBJ

TYPE_LONG_OBJ

public static final int TYPE_LONG_OBJ

TYPE_SHORT_OBJ

public static final int TYPE_SHORT_OBJ

TYPE_BIGDECIMAL

public static final int TYPE_BIGDECIMAL

TYPE_BIGINTEGER

public static final int TYPE_BIGINTEGER

TYPE_LOCALE

public static final int TYPE_LOCALE

TYPE_INTERFACE

public static final int TYPE_INTERFACE
Method Detail

getOwner

public ClassMetaData getOwner()
Return the owning metadata for this field.

getName

public String getName()
Return the name of the described field.

getIndex

public int getIndex()
Return the absolute index of this persistent/transactional field. This method cannot be used during enhancement.

getDeclaredIndex

public int getDeclaredIndex()
Return the relative index of this persistent/transactional field.

getType

public Class getType()
Return the class of the described field.

getTypeCode

public int getTypeCode()
Return the type code of the described field.

isPersistent

public boolean isPersistent()
If false, the field is transactional but not persistent.

isPrimaryKey

public boolean isPrimaryKey()
If true, the field was specified in the meta data to be a primary key field.

getFieldFlag

public byte getFieldFlag()
Returns the JDO flag type for this field. See the field types in the PersistenceCapable interface.

getNullValue

public int getNullValue()
How the data store should treat null values for this field: Defaults to NULL_NONE.

isExplicit

public boolean isExplicit()
Return true if the field is explicitly marked persistent or transactional in the metadata.

isInDefaultFetchGroup

public boolean isInDefaultFetchGroup()
Return true if the field should be fetched at once along with all other default fetch group fields, rather than individually. Defaults to true if the field is not a collection or map or first class object; defaults to false otherwise.

isEmbedded

public 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. Defaults to true if the field is not a collection or map or first class object; defaults to false otherwise. Implementations are permitted to ignore this attribute.

getElementType

public 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.

getElementTypeCode

public int getElementTypeCode()
Return the type code of objects stored in the array/collection/map, or -1 if not an array/collection/map.

isEmbeddedElement

public boolean isEmbeddedElement()
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. Implementations are permitted to ignore this attribute.

getKeyType

public 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.

getKeyTypeCode

public int getKeyTypeCode()
The type code of objects used as keys in the map.

isEmbeddedKey

public boolean isEmbeddedKey()
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. Implementations are permitted to ignore this attribute.

compareTo

public int compareTo(Object other)
FieldMetaData orders itself on field name.
Specified by:
compareTo in interface Comparable

isDependent

public boolean isDependent()

setDependent

public void setDependent(boolean cascade)

isElementDependent

public boolean isElementDependent()

setElementDependent

public void setElementDependent(boolean cascade)

isKeyDependent

public boolean isKeyDependent()

setKeyDependent

public void setKeyDependent(boolean cascade)

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.