Class PersistenceFieldElementImpl
java.lang.Object
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceMemberElementImpl
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl
- All Implemented Interfaces:
PersistenceElement.Impl,PersistenceElementProperties,PersistenceFieldElement.Impl,PersistenceMemberElement.Impl
- Direct Known Subclasses:
RelationshipElementImpl
public class PersistenceFieldElementImpl
extends PersistenceMemberElementImpl
implements PersistenceFieldElement.Impl
- Version:
- %I%
- Author:
- raccah
-
Field Summary
Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
ADD, REMOVE, SETFields 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
ConstructorsConstructorDescriptionCreate new PersistenceFieldElementImpl with no corresponding name.Creates new PersistenceFieldElementImpl with the corresponding name -
Method Summary
Modifier and TypeMethodDescriptionintGet the persistence type of this field element.booleanisKey()Determines whether this field element is a key field or not.booleanDetermines whether this field element is read sensitive or not.booleanDetermines whether this field element is write sensitive or not.voidsetKey(boolean flag) Set whether this field element is a key field or not.voidsetPersistenceType(int type) Set the persistence type of this field element.voidsetReadSensitive(boolean flag) Set whether this field element is read sensitive or not.voidsetWriteSensitive(boolean flag) Set whether this field element is write sensitive or not.Methods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceMemberElementImpl
firePropertyChange, fireVetoableChangeMethods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
-
Constructor Details
-
PersistenceFieldElementImpl
public PersistenceFieldElementImpl()Create new PersistenceFieldElementImpl with no corresponding name. This constructor should only be used for cloning and archiving. -
PersistenceFieldElementImpl
Creates new PersistenceFieldElementImpl with the corresponding name- Parameters:
name- the name of the element
-
-
Method Details
-
getPersistenceType
public int getPersistenceType()Get the persistence type of this field element.- Specified by:
getPersistenceTypein interfacePersistenceFieldElement.Impl- Returns:
- the persistence type, one of
PersistenceFieldElement.PERSISTENTorPersistenceFieldElement.DERIVED. The default is PERSISTENT.
-
setPersistenceType
Set the persistence type of this field element.- Specified by:
setPersistenceTypein interfacePersistenceFieldElement.Impl- Parameters:
type- - an integer indicating the persistence type, one of:PersistenceFieldElement.PERSISTENTorPersistenceFieldElement.DERIVED- Throws:
ModelException- if impossible
-
isReadSensitive
public boolean isReadSensitive()Determines whether this field element is read sensitive or not. This value is only used ifgetPersistenceTypereturnsDERIVED- Specified by:
isReadSensitivein interfacePersistenceFieldElement.Impl- Returns:
trueif the field is read sensitive,falseif it is not or if the persistence type is not derived- See Also:
-
setReadSensitive
Set whether this field element is read sensitive or not.- Specified by:
setReadSensitivein interfacePersistenceFieldElement.Impl- Parameters:
flag- - iftrueand this is a derived field, the field element is marked as read sensitive; otherwise, it is not This value is only used ifgetPersistenceTypereturnsDERIVED- Throws:
ModelException- if impossible- See Also:
-
isWriteSensitive
public boolean isWriteSensitive()Determines whether this field element is write sensitive or not. This value is only used ifgetPersistenceTypereturnsDERIVED- Specified by:
isWriteSensitivein interfacePersistenceFieldElement.Impl- Returns:
trueif the field is write sensitive,falseif it is not or if the persistence type is not derived- See Also:
-
setWriteSensitive
Set whether this field element is write sensitive or not.- Specified by:
setWriteSensitivein interfacePersistenceFieldElement.Impl- Parameters:
flag- - iftrueand this is a derived field, the field element is marked as write sensitive; otherwise, it is not This value is only used ifgetPersistenceTypereturnsDERIVED- Throws:
ModelException- if impossible- See Also:
-
isKey
public boolean isKey()Determines whether this field element is a key field or not.- Specified by:
isKeyin interfacePersistenceFieldElement.Impl- Returns:
trueif the field is a key field,falseotherwise- See Also:
-
setKey
Set whether this field element is a key field or not.- Specified by:
setKeyin interfacePersistenceFieldElement.Impl- Parameters:
flag- - iftrue, the field element is marked as a key field; otherwise, it is not- Throws:
ModelException- if impossible- See Also:
-