|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.model.jdo.PersistenceElement
com.sun.jdo.api.persistence.model.jdo.PersistenceMemberElement
com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement
public class PersistenceFieldElement
| Nested Class Summary | |
|---|---|
static interface |
PersistenceFieldElement.Impl
Pluggable implementation of the storage of field element properties. |
| Field Summary | |
|---|---|
static int |
DERIVED
Constant representing a derived field modifier. |
static int |
PERSISTENT
Constant representing a persistent field modifier. |
static int |
TRANSIENT
Constant representing a transient field modifier. |
| Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElementProperties |
|---|
PROP_CARDINALITY, PROP_COLLECTION_CLASS, PROP_DELETE_ACTION, PROP_ELEMENT_CLASS, PROP_FIELDS, PROP_GROUPS, PROP_IDENTITY, PROP_INVERSE_FIELD, PROP_KEY_CLASS, PROP_KEY_FIELD, PROP_MODIFIED, PROP_NAME, PROP_PERSISTENCE, PROP_PREFETCH, PROP_SENSITIVITY, PROP_UPDATE_ACTION |
| Constructor Summary | |
|---|---|
PersistenceFieldElement()
Create new PersistenceFieldElement with no implementation. |
|
PersistenceFieldElement(PersistenceFieldElement.Impl impl,
PersistenceClassElement declaringClass)
Create new PersistenceFieldElement with the provided implementation. |
|
| Method Summary | |
|---|---|
ConcurrencyGroupElement[] |
getConcurrencyGroups()
Returns the array of concurrency groups to which this field belongs. |
int |
getFieldNumber()
Computes the field number of this field element. |
int |
getPersistenceType()
Get the persistence type of this field element. |
boolean |
isKey()
Determines whether this field element is a key field or not. |
boolean |
isReadSensitive()
Determines whether this field element is read sensitive or not. |
boolean |
isWriteSensitive()
Determines whether this field element is write sensitive or not. |
void |
setKey(boolean flag)
Set whether this field element is a key field or not. |
void |
setPersistenceType(int type)
Set the persistence type of this field element. |
void |
setReadSensitive(boolean flag)
Set whether this field element is read sensitive or not. |
void |
setWriteSensitive(boolean flag)
Set whether this field element is write sensitive or not. |
| Methods inherited from class com.sun.jdo.api.persistence.model.jdo.PersistenceMemberElement |
|---|
equals, getDeclaringClass, hashCode, setDeclaringClass |
| Methods inherited from class com.sun.jdo.api.persistence.model.jdo.PersistenceElement |
|---|
addPropertyChangeListener, addVetoableChangeListener, compareTo, getImpl, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setImpl, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int PERSISTENT
public static final int DERIVED
public static final int TRANSIENT
getPersistenceType since there will be no instance of
this class for transient fields.
| Constructor Detail |
|---|
public PersistenceFieldElement()
public PersistenceFieldElement(PersistenceFieldElement.Impl impl,
PersistenceClassElement declaringClass)
impl - the implementation to usedeclaringClass - the class to attach to| Method Detail |
|---|
public int getPersistenceType()
PERSISTENT or
DERIVED
public void setPersistenceType(int type)
throws ModelException
type - - an integer indicating the persistence type, one of:
PERSISTENT or DERIVED
ModelException - if impossiblepublic boolean isReadSensitive()
getPersistenceType returns
DERIVED
true if the field is read sensitive,
false if it is not or if the persistence type is not derivedisWriteSensitive(),
setPersistenceType(int),
DERIVED
public void setReadSensitive(boolean flag)
throws ModelException
flag - - if true and this is a derived field, the field
element is marked as read sensitive; otherwise, it is not
This value is only used if getPersistenceType returns
DERIVED
ModelException - if impossiblesetWriteSensitive(boolean),
setPersistenceType(int),
DERIVEDpublic boolean isWriteSensitive()
getPersistenceType returns
DERIVED
true if the field is write sensitive,
false if it is not or if the persistence type is not derivedisReadSensitive(),
setPersistenceType(int),
DERIVED
public void setWriteSensitive(boolean flag)
throws ModelException
flag - - if true and this is a derived field, the field
element is marked as write sensitive; otherwise, it is not
This value is only used if getPersistenceType returns
DERIVED
ModelException - if impossiblesetReadSensitive(boolean),
setPersistenceType(int),
DERIVEDpublic boolean isKey()
true if the field is a key field,
false otherwisePersistenceClassElement.getKeyClass()
public void setKey(boolean flag)
throws ModelException
flag - - if true, the field element is marked
as a key field; otherwise, it is not
ModelException - if impossiblePersistenceClassElement.getKeyClass()public ConcurrencyGroupElement[] getConcurrencyGroups()
PersistenceClassElement.getConcurrencyGroups()public int getFieldNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||