public class PersistenceFieldElementImpl extends PersistenceMemberElementImpl implements PersistenceFieldElement.Impl
ADD, REMOVE, SET
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 and Description |
---|
PersistenceFieldElementImpl()
Create new PersistenceFieldElementImpl with no corresponding name.
|
PersistenceFieldElementImpl(String name)
Creates new PersistenceFieldElementImpl with the corresponding name
|
Modifier and Type | Method and Description |
---|---|
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.
|
firePropertyChange, fireVetoableChange
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
public PersistenceFieldElementImpl()
public PersistenceFieldElementImpl(String name)
name
- the name of the elementpublic int getPersistenceType()
getPersistenceType
in interface PersistenceFieldElement.Impl
PersistenceFieldElement.PERSISTENT
or
PersistenceFieldElement.DERIVED
. The default is PERSISTENT.public void setPersistenceType(int type) throws ModelException
setPersistenceType
in interface PersistenceFieldElement.Impl
type
- - an integer indicating the persistence type, one of:
PersistenceFieldElement.PERSISTENT
or
PersistenceFieldElement.DERIVED
ModelException
- if impossiblepublic boolean isReadSensitive()
getPersistenceType
returns
DERIVED
isReadSensitive
in interface PersistenceFieldElement.Impl
true
if the field is read sensitive,
false
if it is not or if the persistence type is not
derivedisWriteSensitive()
,
setPersistenceType(int)
,
PersistenceFieldElement.DERIVED
public void setReadSensitive(boolean flag) throws ModelException
setReadSensitive
in interface PersistenceFieldElement.Impl
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)
,
PersistenceFieldElement.DERIVED
public boolean isWriteSensitive()
getPersistenceType
returns
DERIVED
isWriteSensitive
in interface PersistenceFieldElement.Impl
true
if the field is write sensitive,
false
if it is not or if the persistence type is not
derivedisReadSensitive()
,
setPersistenceType(int)
,
PersistenceFieldElement.DERIVED
public void setWriteSensitive(boolean flag) throws ModelException
setWriteSensitive
in interface PersistenceFieldElement.Impl
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)
,
PersistenceFieldElement.DERIVED
public boolean isKey()
isKey
in interface PersistenceFieldElement.Impl
true
if the field is a key field,
false
otherwisePersistenceClassElementImpl.getKeyClass()
public void setKey(boolean flag) throws ModelException
setKey
in interface PersistenceFieldElement.Impl
flag
- - if true
, the field element is marked
as a key field; otherwise, it is notModelException
- if impossiblePersistenceClassElementImpl.getKeyClass()
Copyright © 2018. All rights reserved.