Class FieldGroupElement
- java.lang.Object
-
- com.sun.jdo.api.persistence.model.jdo.PersistenceElement
-
- com.sun.jdo.api.persistence.model.jdo.PersistenceMemberElement
-
- com.sun.jdo.api.persistence.model.jdo.FieldGroupElement
-
- All Implemented Interfaces:
FieldElementHolder,PersistenceElementProperties,Comparable
- Direct Known Subclasses:
ConcurrencyGroupElement
public abstract class FieldGroupElement extends PersistenceMemberElement implements FieldElementHolder
- Version:
- %I%
- Author:
- raccah
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFieldGroupElement.ImplPluggable implementation of the storage of field element properties.
-
Field Summary
-
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
Constructors Constructor Description FieldGroupElement()Create new FieldGroupElement with no implementation.FieldGroupElement(FieldGroupElement.Impl impl, PersistenceClassElement declaringClass)Create new FieldGroupElement with the provided implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddField(PersistenceFieldElement field)Add the supplied field to the collection of fields maintained by this holder.voidaddFields(PersistenceFieldElement[] fields)Add the supplied fields to the collection of fields maintained by this holder.booleancontainsField(PersistenceFieldElement field)Tests whether the supplied field is in the collection of fields maintained by this holder.PersistenceFieldElementgetField(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.voidremoveField(PersistenceFieldElement field)Remove the supplied field from the collection of fields maintained by this holder.voidremoveFields(PersistenceFieldElement[] fields)Removed the supplied fields from the collection of fields maintained by this holder.voidsetFields(PersistenceFieldElement[] fields)Sets the collection of fields maintained by this holder to the contents of the supplied array.-
Methods inherited from class com.sun.jdo.api.persistence.model.jdo.PersistenceMemberElement
equals, getDeclaringClass, hashCode, setDeclaringClass
-
Methods inherited from class com.sun.jdo.api.persistence.model.jdo.PersistenceElement
addPropertyChangeListener, addVetoableChangeListener, compareTo, getImpl, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setImpl, setName, toString
-
-
-
-
Constructor Detail
-
FieldGroupElement
public FieldGroupElement()
Create new FieldGroupElement with no implementation. This constructor should only be used for cloning and archiving.
-
FieldGroupElement
public FieldGroupElement(FieldGroupElement.Impl impl, PersistenceClassElement declaringClass)
Create new FieldGroupElement with the provided implementation. The implementation is responsible for storing all properties of the object.- Parameters:
impl- the implementation to usedeclaringClass- the class to attach to
-
-
Method Detail
-
addField
public void addField(PersistenceFieldElement field) throws ModelException
Add the supplied field to the collection of fields maintained by this holder.- Specified by:
addFieldin interfaceFieldElementHolder- Parameters:
field- the field to be added- Throws:
ModelException- if impossible
-
addFields
public void addFields(PersistenceFieldElement[] fields) throws ModelException
Add the supplied fields to the collection of fields maintained by this holder.- Specified by:
addFieldsin interfaceFieldElementHolder- Parameters:
fields- the array of fields to be added- Throws:
ModelException- if impossible
-
removeField
public void removeField(PersistenceFieldElement field) throws ModelException
Remove the supplied field from the collection of fields maintained by this holder.- Specified by:
removeFieldin interfaceFieldElementHolder- Parameters:
field- the field to be removed- Throws:
ModelException- if impossible
-
removeFields
public void removeFields(PersistenceFieldElement[] fields) throws ModelException
Removed the supplied fields from the collection of fields maintained by this holder.- Specified by:
removeFieldsin interfaceFieldElementHolder- Parameters:
fields- the array of fields to be removed- Throws:
ModelException- if impossible
-
getFields
public PersistenceFieldElement[] getFields()
Returns the collection of fields maintained by this holder in the form of an array.- Specified by:
getFieldsin interfaceFieldElementHolder- Returns:
- the fields maintained by this holder
-
setFields
public void setFields(PersistenceFieldElement[] fields) throws ModelException
Sets the collection of fields maintained by this holder to the contents of the supplied array.- Specified by:
setFieldsin interfaceFieldElementHolder- Parameters:
fields- the fields maintained by this holder- Throws:
ModelException- if impossible
-
getField
public PersistenceFieldElement getField(String name)
Returns the field with the supplied name from the collection of fields maintained by this holder.- Specified by:
getFieldin interfaceFieldElementHolder- Parameters:
name- the name of the field to be found- Returns:
- the field with the supplied name,
nullif none exists
-
containsField
public boolean containsField(PersistenceFieldElement field)
Tests whether the supplied field is in the collection of fields maintained by this holder.- Specified by:
containsFieldin interfaceFieldElementHolder- Parameters:
field- the field to be tested
-
-