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, SET
-
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
Constructors Constructor Description PersistenceFieldElementImpl()Create new PersistenceFieldElementImpl with no corresponding name.PersistenceFieldElementImpl(String name)Creates new PersistenceFieldElementImpl with the corresponding name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPersistenceType()Get the persistence type of this field element.booleanisKey()Determines whether this field element is a key field or not.booleanisReadSensitive()Determines whether this field element is read sensitive or not.booleanisWriteSensitive()Determines 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, fireVetoableChange
-
Methods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
-
-
-
-
Constructor Detail
-
PersistenceFieldElementImpl
public PersistenceFieldElementImpl()
Create new PersistenceFieldElementImpl with no corresponding name. This constructor should only be used for cloning and archiving.
-
PersistenceFieldElementImpl
public PersistenceFieldElementImpl(String name)
Creates new PersistenceFieldElementImpl with the corresponding name- Parameters:
name- the name of the element
-
-
Method Detail
-
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
public void setPersistenceType(int type) throws ModelExceptionSet 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:
isWriteSensitive(),setPersistenceType(int),PersistenceFieldElement.DERIVED
-
setReadSensitive
public void setReadSensitive(boolean flag) throws ModelExceptionSet 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:
setWriteSensitive(boolean),setPersistenceType(int),PersistenceFieldElement.DERIVED
-
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:
isReadSensitive(),setPersistenceType(int),PersistenceFieldElement.DERIVED
-
setWriteSensitive
public void setWriteSensitive(boolean flag) throws ModelExceptionSet 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:
setReadSensitive(boolean),setPersistenceType(int),PersistenceFieldElement.DERIVED
-
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:
PersistenceClassElementImpl.getKeyClass()
-
setKey
public void setKey(boolean flag) throws ModelExceptionSet 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:
PersistenceClassElementImpl.getKeyClass()
-
-