Defines a JDO persistent field. The jdo.field tag can be used on any persistent field or to specify non-default
properties. Many jdo implementation require explicit listing of collection-valued fields.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
persistence-modifier
|
text
|
|
Specifies if the field is persistent, transactional or none of these.
Valid options are:
persistent
transactional
none
Default value(s):
persistent
|
false
|
primary-key
|
bool
|
|
Specifies whether or not this field is part of the primary key for application identity.
|
false
|
null-value
|
text
|
|
Specifies the treatment (exception, default, or none) of null values for persistent fields during storage in the data store.
Valid options are:
exception
default
none
Default value(s):
none
|
false
|
default-fetch-group
|
bool
|
|
Specifies whether this field is managed as a group with other fields.
It defaults to "true" for non-key fields of primitive types, java.util.Date,
and fields of java.lang, java.math types specified above.
|
false
|
embedded
|
bool
|
|
Specifies whether the field should be stored if possible as part of
the instance instead of as its own instance in the datastore. It defaults
to "true" for fields of primitive types, java.util.Date, and fields of
java.lang, java.math, and array types specified above. This attribute
is only a hint to the implementation. A compliant implementation
is permitted to support these types as first class instances in
the datastore. A portable application should
not depend on the
embedded treatment of persistent fields.
|
false
|
collection-type
|
text
|
|
The collection-type property specifies the type (collection, map, or array)
of a collection valued field and provides details about the elements and their storage.
Valid options are:
collection
map
array
|
false
|
element-type
|
text
|
Must be used with collection or array valued persistent field
|
The element-type property specifies the fully qualified java class name of the element
of a collection or array-valued persistent field.
|
false
|
embedded-element
|
bool
|
Must be used only with a collection or array valued persistent field.
|
The embedded-element property specifies whether the elements of a collection or array-valued persistent
field should be stored embedded or as first class objects.
|
false
|
key-type
|
text
|
Must be used only with a map valued persistent field.
|
The key-type property specifies the fully qualified java class name of the keys of map-valued persistent field.
|
false
|
embedded-key
|
bool
|
Must be used only with a map valued persistent field.
|
The embedded-key property specifies whether the keys of a map-valued persistent field should be stored
embedded or as first class objects.
|
false
|
value-type
|
text
|
Must be used only with a map valued persistent field.
|
The value-type property specifies the fully qualified java class name of the values of map-valued persistent field.
|
false
|
embedded-value
|
bool
|
Must be used only with a map valued persistent field.
|
The embedded-value property specifies whether the values of a map-valued persistent field should be stored
embedded or as first class objects.
|
false
|