|
||||||||||
| 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.PersistenceElement
com.sun.jdo.api.persistence.model.jdo.PersistenceClassElement
public class PersistenceClassElement
| Nested Class Summary | |
|---|---|
static interface |
PersistenceClassElement.Impl
Pluggable implementation of the storage of class element properties. |
| Field Summary | |
|---|---|
static int |
APPLICATION_IDENTITY
Constant representing jdo identity managed by the application. |
static int |
DATABASE_IDENTITY
Constant representing jdo identity managed by the database. |
static int |
UNMANAGED_IDENTITY
Constant representing unmanaged jdo identity. |
| 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 | |
|---|---|
PersistenceClassElement()
Create new PersistenceClassElement with no implementation. |
|
PersistenceClassElement(PersistenceClassElement.Impl impl)
Create new PersistenceClassElement with the provided implementation. |
|
| Method Summary | |
|---|---|
void |
addConcurrencyGroup(ConcurrencyGroupElement group)
Add the supplied group to the collection of concurrency groups for this class. |
void |
addConcurrencyGroups(ConcurrencyGroupElement[] groups)
Add the supplied groups to the collection of concurrency groups for this class. |
void |
addField(PersistenceFieldElement field)
Add the supplied field to the collection of fields maintained by this holder. |
void |
addFields(PersistenceFieldElement[] fields)
Add the supplied fields to the collection of fields maintained by this holder. |
boolean |
containsConcurrencyGroup(ConcurrencyGroupElement group)
Tests whether the supplied group is in the collection of groups maintained by this class. |
boolean |
containsField(PersistenceFieldElement field)
Tests whether the supplied field is in the collection of fields maintained by this holder. |
static PersistenceClassElement |
forName(String name,
Model model)
Returns the persistence class element associated with the class with the given string name, using the given model object to look it up. |
ConcurrencyGroupElement |
getConcurrencyGroup(String name)
Returns the concurrency group with the supplied name from the collection of groups maintained by this class. |
ConcurrencyGroupElement[] |
getConcurrencyGroups()
Returns the collection of fields groups by this class in the form of an array. |
PersistenceFieldElement |
getField(String name)
Returns the field with the supplied name from the collection of fields maintained by this holder. |
PersistenceFieldElement[] |
getFields()
Returns the collection of fields maintained by this holder in the form of an array. |
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. |
String |
getPackage()
Get the package name of this class element. |
RelationshipElement |
getRelationship(String name)
Returns the relationship with the supplied name from the collection of relationships maintained by this holder. |
RelationshipElement[] |
getRelationships()
Returns the subset of the collection of fields which are relationahips. |
boolean |
isModified()
Gets the modified flag for this persistence class. |
void |
removeConcurrencyGroup(ConcurrencyGroupElement group)
Remove the supplied group from the collection of concurrency groups for this class. |
void |
removeConcurrencyGroups(ConcurrencyGroupElement[] groups)
Removed the supplied groups from the collection of concurrency groups for this class. |
void |
removeField(PersistenceFieldElement field)
Remove the supplied field from the collection of fields maintained by this holder. |
void |
removeFields(PersistenceFieldElement[] fields)
Removed the supplied fields from the collection of fields maintained by this holder. |
void |
setConcurrencyGroups(ConcurrencyGroupElement[] groups)
Sets the collection of concurrency groups maintained by this class to the contents of the supplied array. |
void |
setFields(PersistenceFieldElement[] fields)
Sets the collection of fields maintained by this holder to the contents of the supplied array. |
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 |
setName(String name)
Set the name of this persistence element. |
void |
setObjectIdentityType(int type)
Set the object identity type of this class element. |
| Methods inherited from class com.sun.jdo.api.persistence.model.jdo.PersistenceElement |
|---|
addPropertyChangeListener, addVetoableChangeListener, compareTo, equals, getImpl, getMessages, getName, hashCode, removePropertyChangeListener, removeVetoableChangeListener, setImpl, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int APPLICATION_IDENTITY
public static final int DATABASE_IDENTITY
public static final int UNMANAGED_IDENTITY
| Constructor Detail |
|---|
public PersistenceClassElement()
public PersistenceClassElement(PersistenceClassElement.Impl impl)
impl - the implementation to use| Method Detail |
|---|
public static PersistenceClassElement forName(String name,
Model model)
name - the fully qualified name of the desired classmodel - the model object to be used to look it up
public String getPackage()
PersistenceElement.getName()public boolean isModified()
true 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.
flag - if true, this class is marked as modified;
if false, it is marked as unmodified.public int getObjectIdentityType()
APPLICATION_IDENTITY,
DATABASE_IDENTITY, or UNMANAGED_IDENTITY
public void setObjectIdentityType(int type)
throws ModelException
type - - an integer indicating the object identity type, one of:
APPLICATION_IDENTITY, DATABASE_IDENTITY, or
UNMANAGED_IDENTITY
ModelException - if impossiblepublic String getKeyClass()
getObjectIdentityType
returns APPLICATION_IDENTITY
null if the
identity type is not managed by the applicationsetObjectIdentityType(int),
APPLICATION_IDENTITY
public void setKeyClass(String name)
throws ModelException
name - - the fully qualified name which represents the primary key
class. This value is only used if getObjectIdentityType
returns APPLICATION_IDENTITY
ModelException - if impossiblesetObjectIdentityType(int),
APPLICATION_IDENTITY
public void setName(String name)
throws ModelException
key class in sync if possible.
setName in class PersistenceElementname - the name
ModelException - if impossible
public void addField(PersistenceFieldElement field)
throws ModelException
addField in interface FieldElementHolderfield - the field to be added
ModelException - if impossible
public void addFields(PersistenceFieldElement[] fields)
throws ModelException
addFields in interface FieldElementHolderfields - the array of fields to be added
ModelException - if impossible
public void removeField(PersistenceFieldElement field)
throws ModelException
removeField in interface FieldElementHolderfield - the field to be removed
ModelException - if impossible
public void removeFields(PersistenceFieldElement[] fields)
throws ModelException
removeFields in interface FieldElementHolderfields - the array of fields to be removed
ModelException - if impossiblepublic PersistenceFieldElement[] getFields()
getFields in interface FieldElementHolder
public void setFields(PersistenceFieldElement[] fields)
throws ModelException
setFields in interface FieldElementHolderfields - the fields maintained by this holder
ModelException - if impossiblepublic PersistenceFieldElement getField(String name)
getField in interface FieldElementHoldername - the name of the field to be found
null if none
existspublic boolean containsField(PersistenceFieldElement field)
containsField in interface FieldElementHolderfield - the field to be testedpublic RelationshipElement[] getRelationships()
getFields()public RelationshipElement getRelationship(String name)
name - the name of the relationship to be found
null if
none existsgetRelationships(),
getField(java.lang.String)
public void addConcurrencyGroup(ConcurrencyGroupElement group)
throws ModelException
group - the concurrency group to be added
ModelException - if impossible
public void addConcurrencyGroups(ConcurrencyGroupElement[] groups)
throws ModelException
groups - the array of concurrency groups to be added
ModelException - if impossible
public void removeConcurrencyGroup(ConcurrencyGroupElement group)
throws ModelException
group - the concurrency group to be removed
ModelException - if impossible
public void removeConcurrencyGroups(ConcurrencyGroupElement[] groups)
throws ModelException
groups - the array of concurrency groups to be removed
ModelException - if impossiblepublic ConcurrencyGroupElement[] getConcurrencyGroups()
public void setConcurrencyGroups(ConcurrencyGroupElement[] groups)
throws ModelException
groups - the concurrency groups maintained by this holder
ModelException - if impossiblepublic ConcurrencyGroupElement getConcurrencyGroup(String name)
name - the name of the concurrency group to be found
null
if none existspublic boolean containsConcurrencyGroup(ConcurrencyGroupElement group)
group - the concurrency group to be tested
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||