public class PersistenceClassElementImpl extends PersistenceElementImpl implements PersistenceClassElement.Impl
ADD, REMOVE, SETPROP_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 |
|---|
PersistenceClassElementImpl()
Create new PersistenceClassElementImpl with no corresponding name.
|
PersistenceClassElementImpl(String name)
Creates new PersistenceClassElementImpl with the corresponding name
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeConcurrencyGroups(ConcurrencyGroupElement[] groups,
int action)
Change the set of concurrency groups.
|
void |
changeFields(PersistenceFieldElement[] fields,
int action)
Change the set of fields.
|
protected void |
firePropertyChange(String name,
Object o,
Object n)
Fires property change event.
|
protected void |
fireVetoableChange(String name,
Object o,
Object n)
Fires vetoable change event.
|
ConcurrencyGroupElement |
getConcurrencyGroup(String name)
Find a concurrency group by name.
|
ConcurrencyGroupElement[] |
getConcurrencyGroups()
Get all concurrency groups.
|
PersistenceFieldElement |
getField(String name)
Find a field by name.
|
PersistenceElementCollection |
getFieldCollection()
Returns the field collection of this class element.
|
PersistenceFieldElement[] |
getFields()
Get all fields.
|
PersistenceElementCollection |
getGroupCollection()
Returns the concurrency group collection of this class element.
|
String |
getKeyClass()
Get the fully qualified name of the primary key class for this class
element.
|
int |
getObjectIdentityType()
Get the object identity type of this class element.
|
boolean |
isModified()
Gets the modified flag for this persistence class.
|
void |
setFieldCollection(PersistenceElementCollection collection)
Set the field collection of this class element to the supplied
collection.
|
void |
setGroupCollection(PersistenceElementCollection collection)
Set the concurrency group collection of this class element to the
supplied collection.
|
void |
setKeyClass(String name)
Set the primary key class for this class element.
|
void |
setModified(boolean flag)
Set the modified flag for this persistence class to flag.
|
void |
setObjectIdentityType(int type)
Set the object identity type of this class element.
|
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setNamepublic PersistenceClassElementImpl()
public PersistenceClassElementImpl(String name)
name - the name of the elementprotected final void firePropertyChange(String name, Object o, Object n)
firePropertyChange in class PersistenceElementImplname - property nameo - old valuen - new valueprotected final void fireVetoableChange(String name, Object o, Object n) throws PropertyVetoException
fireVetoableChange in class PersistenceElementImplname - property nameo - old valuen - new valuePropertyVetoException - when the change is vetoed by a listenerpublic boolean isModified()
isModified in interface PersistenceClassElement.Impltrue if there have been (property) changes to this
class, false otherwise.public void setModified(boolean flag)
true by property changes and
false after a save.setModified in interface PersistenceClassElement.Implflag - if true, this class is marked as modified;
if false, it is marked as unmodified.public int getObjectIdentityType()
getObjectIdentityType in interface PersistenceClassElement.ImplPersistenceClassElement.APPLICATION_IDENTITY,
PersistenceClassElement.DATABASE_IDENTITY, or
PersistenceClassElement.UNMANAGED_IDENTITY. The default is
APPLICATION_IDENTITY.public void setObjectIdentityType(int type)
throws ModelException
setObjectIdentityType in interface PersistenceClassElement.Impltype - - an integer indicating the object identity type, one of:
PersistenceClassElement.APPLICATION_IDENTITY,
PersistenceClassElement.DATABASE_IDENTITY, or
PersistenceClassElement.UNMANAGED_IDENTITYModelException - if impossiblepublic String getKeyClass()
getObjectIdentityType
returns APPLICATION_IDENTITYgetKeyClass in interface PersistenceClassElement.Implnull if the
identity type is not managed by the applicationsetObjectIdentityType(int),
PersistenceClassElement.APPLICATION_IDENTITYpublic void setKeyClass(String name) throws ModelException
setKeyClass in interface PersistenceClassElement.Implname - - the fully qualified name which represents the primary key
class. This value is only used if getObjectIdentityType
returns APPLICATION_IDENTITYModelException - if impossiblesetObjectIdentityType(int),
PersistenceClassElement.APPLICATION_IDENTITYpublic void changeFields(PersistenceFieldElement[] fields, int action) throws ModelException
changeFields in interface PersistenceClassElement.Implfields - the new fieldsaction - PersistenceElement.Impl.ADD, PersistenceElement.Impl.REMOVE, or PersistenceElement.Impl.SETModelException - if impossiblepublic PersistenceFieldElement[] getFields()
getFields in interface PersistenceClassElement.Implpublic PersistenceFieldElement getField(String name)
getField in interface PersistenceClassElement.Implname - the name to matchnull if it does not existpublic void changeConcurrencyGroups(ConcurrencyGroupElement[] groups, int action) throws ModelException
changeConcurrencyGroups in interface PersistenceClassElement.Implgroups - the new concurrency groupsaction - PersistenceElement.Impl.ADD, PersistenceElement.Impl.REMOVE, or PersistenceElement.Impl.SETModelException - if impossiblepublic ConcurrencyGroupElement[] getConcurrencyGroups()
getConcurrencyGroups in interface PersistenceClassElement.Implpublic ConcurrencyGroupElement getConcurrencyGroup(String name)
getConcurrencyGroup in interface PersistenceClassElement.Implname - the name to matchnull if it does not existpublic PersistenceElementCollection getFieldCollection()
public void setFieldCollection(PersistenceElementCollection collection)
collection - the field collection of this class elementpublic PersistenceElementCollection getGroupCollection()
public void setGroupCollection(PersistenceElementCollection collection)
collection - the concurrency group collection of this class elementCopyright © 2017–2019 Eclipse Foundation. All rights reserved.