Package javax.jdo.annotations
Annotation Type Persistent
-
@Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface PersistentAnnotation for defining the persistence of a member. This corresponds to the xml elements "field" and "property".- Since:
- 2.1
- Version:
- 2.1
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringcacheableWhether this field/property is cacheable in a Level2 cache.java.lang.StringcolumnColumn name where the values are stored for this member.Column[]columnsColumn definition(s) for this member.java.lang.StringcustomValueStrategyCustom value strategy to use to generate the value for this field or property (if any).java.lang.StringdefaultFetchGroupWhether this member is in the default fetch group.java.lang.StringdependentWhether related object(s) of this member are dependent and so deleted when this object is deleted.java.lang.StringdependentElementWhether the elements of this member are dependent.java.lang.StringdependentKeyWhether the keys of this member are dependent.java.lang.StringdependentValueWhether the values of this member are dependent.java.lang.StringembeddedWhether this member is embedded.java.lang.StringembeddedElementWhether the elements of this member are embedded.java.lang.StringembeddedKeyWhether the keys of this member are embedded.java.lang.StringembeddedValueWhether the values of this member are embedded.Extension[]extensionsVendor extensions for this member.java.lang.StringloadFetchGroupName of the fetch-group to use when this member is loaded due to being referenced when not already loaded.java.lang.StringmappedByName of the related member in the other class where this value is mapped (bidirectional relationship).java.lang.StringnameName of the member when this is embedded in another object.java.lang.StringnullIndicatorColumnNull indicator column for this member.NullValuenullValueBehavior when this member contains a null value.PersistenceModifierpersistenceModifierModifier for this field.java.lang.StringprimaryKeyWhether this member is part of the primary key for application identity.intrecursionDepthRecursion depth for this member.java.lang.StringsequenceName of the sequence to use with particular value strategies.java.lang.StringserializedWhether this member is serialized into a single column.java.lang.StringserializedElementWhether the elements of this member are serialized.java.lang.StringserializedKeyWhether the keys of this member are serialized.java.lang.StringserializedValueWhether the values of this member are serialized.java.lang.StringtableTable to use for persisting this member.java.lang.Class[]typesTypes of the member.IdGeneratorStrategyvalueStrategyValue strategy to use to generate the value for this field or property (if any).
-
-
-
Element Detail
-
persistenceModifier
PersistenceModifier persistenceModifier
Modifier for this field. This is normally not specified, and the defaults are used, or the @Transactional or @NotPersistent annotation is specified directly on the member. One possible use for specifying persistenceModifier is for embedded instances in which a member is not persistent but in the non-embedded instances the member is persistent. Note that it is not portable to specify a member to be not persistent in the non-embedded case and persistent in the embedded usage.- Returns:
- the persistence modifier
- Default:
- javax.jdo.annotations.PersistenceModifier.UNSPECIFIED
-
-
-
nullValue
NullValue nullValue
Behavior when this member contains a null value.- Returns:
- the behavior when this member contains a null value
- Default:
- javax.jdo.annotations.NullValue.NONE
-
-
-
valueStrategy
IdGeneratorStrategy valueStrategy
Value strategy to use to generate the value for this field or property (if any).- Returns:
- the generated value strategy
- Default:
- javax.jdo.annotations.IdGeneratorStrategy.UNSPECIFIED
-
-
-
types
java.lang.Class[] types
Types of the member. Used when the declared member type is a supertype of the actual type that is stored in the member. For example, the declared member type might be an interface type that must contain an object of a concrete type when used for persistence.- Returns:
- the types
- Default:
- {}
-
-
-
columns
Column[] columns
Column definition(s) for this member. Used for mapping multiple columns to the same member, for example relationships with multiple column foreign keys.- Returns:
- the columns for this member
- Default:
- {}
-
-
-
name
java.lang.String name
Name of the member when this is embedded in another object. The fully-qualified member name is used. For example, "line.point1.x" refers to the member x in class Point that is embedded as member point1 in class Line that is embedded in a member called line.- Returns:
- the name of the member
- Default:
- ""
-
-
-
extensions
Extension[] extensions
Vendor extensions for this member.- Returns:
- the vendor extensions
- Default:
- {}
-
-