|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceClassElementImpl
public class PersistenceClassElementImpl
| 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 | |
|---|---|
PersistenceClassElementImpl()
Create new PersistenceClassElementImpl with no corresponding name. |
|
PersistenceClassElementImpl(String name)
Creates new PersistenceClassElementImpl with the corresponding name |
|
| Method Summary | |
|---|---|
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. |
| 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 |
|---|
public PersistenceClassElementImpl()
public PersistenceClassElementImpl(String name)
name - the name of the element| Method Detail |
|---|
protected final void firePropertyChange(String name,
Object o,
Object n)
firePropertyChange in class PersistenceElementImplname - property nameo - old valuen - new value
protected final void fireVetoableChange(String name,
Object o,
Object n)
throws PropertyVetoException
fireVetoableChange in class PersistenceElementImplname - property nameo - old valuen - new value
PropertyVetoException - 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_IDENTITY
ModelException - if impossiblepublic String getKeyClass()
getObjectIdentityType
returns APPLICATION_IDENTITY
getKeyClass in interface PersistenceClassElement.Implnull if the
identity type is not managed by the applicationsetObjectIdentityType(int),
PersistenceClassElement.APPLICATION_IDENTITY
public 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_IDENTITY
ModelException - if impossiblesetObjectIdentityType(int),
PersistenceClassElement.APPLICATION_IDENTITY
public 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.SET
ModelException - if impossiblepublic PersistenceFieldElement[] getFields()
getFields in interface PersistenceClassElement.Implpublic PersistenceFieldElement getField(String name)
getField in interface PersistenceClassElement.Implname - the name to match
null if it does not exist
public 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.SET
ModelException - if impossiblepublic ConcurrencyGroupElement[] getConcurrencyGroups()
getConcurrencyGroups in interface PersistenceClassElement.Implpublic ConcurrencyGroupElement getConcurrencyGroup(String name)
getConcurrencyGroup in interface PersistenceClassElement.Implname - the name to match
null 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 element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||