|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface PersistentProperty
Annotation for a persistent bean property. It can be put next to a getter or setter, but not both. The TransientProperty annotation takes precendence.
Optional Element Summary | |
---|---|
java.lang.String |
field
The requested field name. |
boolean |
globalReference
Define this element as true when a property
must be able to refer to persistent objects of different
types. |
boolean |
nullable
Whether the database field should be declared nullable. |
java.lang.String |
renamedFrom
If the property is renamed from another, provide the name of the renamed field with this annotation value. |
public abstract java.lang.String field
public abstract boolean nullable
public abstract java.lang.String renamedFrom
fieldName
value, or unless truncated due to length, field names are
the same as property names).
Normally when a property is renamed the effect is no different
to removing the old property and creating a new one, which
will result in loss of all data stored by the renamed property.
This annotation value helps retain the old property's data.
- Default:
- ""
public abstract boolean globalReference
true
when a property
must be able to refer to persistent objects of different
types. A property whose compile-time type is Object
may be defined to be a global reference by means of this
element. Persistent reference properties not defined to
be global must have a compile-time type that exactly matches the
run-time type of property values.
Use of this element is not recommended under normal circumstances.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |