Interface PersistenceClassElement.Impl
- All Superinterfaces:
PersistenceElement.Impl
- All Known Implementing Classes:
PersistenceClassElementImpl
- Enclosing class:
PersistenceClassElement
Pluggable implementation of the storage of class element properties.
- See Also:
-
Field Summary
Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
ADD, REMOVE, SET -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeConcurrencyGroups(ConcurrencyGroupElement[] groups, int action) Change the set of concurrency groups.voidchangeFields(PersistenceFieldElement[] fields, int action) Change the set of fields.getConcurrencyGroup(String name) Find a concurrency group by name.Get all concurrency groups.Find a field by name.Get all fields.Get the fully qualified name of the primary key class for this class element.intGet the object identity type of this class element.booleanGets 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 Details
-
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
Set 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:
-
setKeyClass
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:
-
changeFields
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
Find a field by name.- Parameters:
name- the name to match- Returns:
- the field, or
nullif it does not exist
-
changeConcurrencyGroups
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
Find a concurrency group by name.- Parameters:
name- the name to match- Returns:
- the concurrency group, or
nullif it does not exist
-