Interface PersistenceClassElement.Impl
-
- All Superinterfaces:
PersistenceElement.Impl
- All Known Implementing Classes:
PersistenceClassElementImpl
- Enclosing class:
- PersistenceClassElement
public static interface PersistenceClassElement.Impl extends PersistenceElement.Impl
Pluggable implementation of the storage of class element properties.
-
-
Field Summary
-
Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
ADD, REMOVE, SET
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeConcurrencyGroups(ConcurrencyGroupElement[] groups, int action)Change the set of concurrency groups.voidchangeFields(PersistenceFieldElement[] fields, int action)Change the set of fields.ConcurrencyGroupElementgetConcurrencyGroup(String name)Find a concurrency group by name.ConcurrencyGroupElement[]getConcurrencyGroups()Get all concurrency groups.PersistenceFieldElementgetField(String name)Find a field by name.PersistenceFieldElement[]getFields()Get all fields.StringgetKeyClass()Get the fully qualified name of the primary key class for this class element.intgetObjectIdentityType()Get the object identity type of this class element.booleanisModified()Gets the modified flag for this persistence class.voidsetKeyClass(String name)Set the primary key class for this class element.voidsetModified(boolean flag)Set the modified flag for this persistence class to flag.voidsetObjectIdentityType(int type)Set the object identity type of this class element.-
Methods inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName
-
-
-
-
Method Detail
-
isModified
boolean isModified()
Gets the modified flag for this persistence class.- Returns:
trueif there have been (property) changes to this class,falseotherwise.
-
setModified
void setModified(boolean flag)
Set the modified flag for this persistence class to flag. This is usually set totrueby property changes andfalseafter a save.- Parameters:
flag- iftrue, this class is marked as modified; iffalse, it is marked as unmodified.
-
getObjectIdentityType
int getObjectIdentityType()
Get the object identity type of this class element.- Returns:
- the object identity type, one of
PersistenceClassElement.APPLICATION_IDENTITY,PersistenceClassElement.DATABASE_IDENTITY, orPersistenceClassElement.UNMANAGED_IDENTITY
-
setObjectIdentityType
void setObjectIdentityType(int type) throws ModelExceptionSet the object identity type of this class element.- Parameters:
type- - an integer indicating the object identity type, one of:PersistenceClassElement.APPLICATION_IDENTITY,PersistenceClassElement.DATABASE_IDENTITY, orPersistenceClassElement.UNMANAGED_IDENTITY- Throws:
ModelException- if impossible
-
getKeyClass
String getKeyClass()
Get the fully qualified name of the primary key class for this class element. This value is only used ifgetObjectIdentityTypereturnsAPPLICATION_IDENTITY- Returns:
- the fully qualified key class name,
nullif the identity type is not managed by the application - See Also:
setObjectIdentityType(int),PersistenceClassElement.APPLICATION_IDENTITY
-
setKeyClass
void setKeyClass(String name) throws ModelException
Set the primary key class for this class element.- Parameters:
name- - the fully qualified name which represents the primary key class. This value is only used ifgetObjectIdentityTypereturnsAPPLICATION_IDENTITY- Throws:
ModelException- if impossible- See Also:
setObjectIdentityType(int),PersistenceClassElement.APPLICATION_IDENTITY
-
changeFields
void changeFields(PersistenceFieldElement[] fields, int action) throws ModelException
Change the set of fields.- Parameters:
fields- the new fieldsaction-PersistenceElement.Impl.ADD,PersistenceElement.Impl.REMOVE, orPersistenceElement.Impl.SET- Throws:
ModelException- if impossible
-
getFields
PersistenceFieldElement[] getFields()
Get all fields.- Returns:
- the fields
-
getField
PersistenceFieldElement getField(String name)
Find a field by name.- Parameters:
name- the name to match- Returns:
- the field, or
nullif it does not exist
-
changeConcurrencyGroups
void changeConcurrencyGroups(ConcurrencyGroupElement[] groups, int action) throws ModelException
Change the set of concurrency groups.- Parameters:
groups- the new concurrency groupsaction-PersistenceElement.Impl.ADD,PersistenceElement.Impl.REMOVE, orPersistenceElement.Impl.SET- Throws:
ModelException- if impossible
-
getConcurrencyGroups
ConcurrencyGroupElement[] getConcurrencyGroups()
Get all concurrency groups.- Returns:
- the concurrency groups
-
getConcurrencyGroup
ConcurrencyGroupElement getConcurrencyGroup(String name)
Find a concurrency group by name.- Parameters:
name- the name to match- Returns:
- the concurrency group, or
nullif it does not exist
-
-