com.sun.jdo.api.persistence.model.jdo
Interface PersistenceFieldElement.Impl

All Superinterfaces:
PersistenceElement.Impl, PersistenceMemberElement.Impl
All Known Subinterfaces:
RelationshipElement.Impl
All Known Implementing Classes:
PersistenceFieldElementImpl, RelationshipElementImpl
Enclosing class:
PersistenceFieldElement

public static interface PersistenceFieldElement.Impl
extends PersistenceMemberElement.Impl

Pluggable implementation of the storage of field element properties.

See Also:
PersistenceFieldElement.PersistenceFieldElement(com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement.Impl, com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement)

Field Summary
 
Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
ADD, REMOVE, SET
 
Method Summary
 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 interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
 

Method Detail

getPersistenceType

int getPersistenceType()
Get the persistence type of this field element.

Returns:
the persistence type, one of PersistenceFieldElement.PERSISTENT or PersistenceFieldElement.DERIVED

setPersistenceType

void setPersistenceType(int type)
                        throws ModelException
Set the persistence type of this field element.

Parameters:
type - - an integer indicating the persistence type, one of: PersistenceFieldElement.PERSISTENT or PersistenceFieldElement.DERIVED
Throws:
ModelException - if impossible

isReadSensitive

boolean isReadSensitive()
Determines whether this field element is read sensitive or not. This value is only used if getPersistenceType returns DERIVED

Returns:
true if the field is read sensitive, false if it is not or if the persistence type is not derived
See Also:
isWriteSensitive(), setPersistenceType(int), PersistenceFieldElement.DERIVED

setReadSensitive

void setReadSensitive(boolean flag)
                      throws ModelException
Set whether this field element is read sensitive or not.

Parameters:
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
Throws:
ModelException - if impossible
See Also:
setWriteSensitive(boolean), setPersistenceType(int), PersistenceFieldElement.DERIVED

isWriteSensitive

boolean isWriteSensitive()
Determines whether this field element is write sensitive or not. This value is only used if getPersistenceType returns DERIVED

Returns:
true if the field is write sensitive, false if it is not or if the persistence type is not derived
See Also:
isReadSensitive(), setPersistenceType(int), PersistenceFieldElement.DERIVED

setWriteSensitive

void setWriteSensitive(boolean flag)
                       throws ModelException
Set whether this field element is write sensitive or not.

Parameters:
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
Throws:
ModelException - if impossible
See Also:
setReadSensitive(boolean), setPersistenceType(int), PersistenceFieldElement.DERIVED

isKey

boolean isKey()
Determines whether this field element is a key field or not.

Returns:
true if the field is a key field, false otherwise
See Also:
PersistenceClassElement.getKeyClass()

setKey

void setKey(boolean flag)
            throws ModelException
Set whether this field element is a key field or not.

Parameters:
flag - - if true, the field element is marked as a key field; otherwise, it is not
Throws:
ModelException - if impossible
See Also:
PersistenceClassElement.getKeyClass()


Copyright © 2012 GlassFish Community. All Rights Reserved.