com.sun.jdo.api.persistence.model.jdo.impl
Class FieldGroupElementImpl

java.lang.Object
  extended by com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
      extended by com.sun.jdo.api.persistence.model.jdo.impl.PersistenceMemberElementImpl
          extended by com.sun.jdo.api.persistence.model.jdo.impl.FieldGroupElementImpl
All Implemented Interfaces:
FieldGroupElement.Impl, PersistenceElement.Impl, PersistenceElementProperties, PersistenceMemberElement.Impl
Direct Known Subclasses:
ConcurrencyGroupElementImpl

public class FieldGroupElementImpl
extends PersistenceMemberElementImpl
implements FieldGroupElement.Impl

Version:
%I%
Author:
raccah

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
FieldGroupElementImpl()
          Create new FieldGroupElementImpl with no corresponding name.
FieldGroupElementImpl(String name)
          Creates new FieldGroupElementImpl with the corresponding name
 
Method Summary
 void changeFields(PersistenceFieldElement[] fields, int action)
          Change the set of fields.
 PersistenceElementCollection getCollection()
          Returns the field collection of this field group element.
 PersistenceFieldElement getField(String name)
          Find a field by name.
 PersistenceFieldElement[] getFields()
          Get all fields.
 void setCollection(PersistenceElementCollection collection)
          Set the field collection of this field group element to the supplied collection.
 
Methods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceMemberElementImpl
firePropertyChange, fireVetoableChange
 
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

FieldGroupElementImpl

public FieldGroupElementImpl()
Create new FieldGroupElementImpl with no corresponding name. This constructor should only be used for cloning and archiving.


FieldGroupElementImpl

public FieldGroupElementImpl(String name)
Creates new FieldGroupElementImpl with the corresponding name

Parameters:
name - the name of the element
Method Detail

getField

public PersistenceFieldElement getField(String name)
Find a field by name.

Specified by:
getField in interface FieldGroupElement.Impl
Parameters:
name - the name to match
Returns:
the field, or null if it does not exist

getFields

public PersistenceFieldElement[] getFields()
Get all fields.

Specified by:
getFields in interface FieldGroupElement.Impl
Returns:
the fields

changeFields

public void changeFields(PersistenceFieldElement[] fields,
                         int action)
                  throws ModelException
Change the set of fields.

Specified by:
changeFields in interface FieldGroupElement.Impl
Parameters:
fields - the new fields
action - PersistenceElement.Impl.ADD, PersistenceElement.Impl.REMOVE, or PersistenceElement.Impl.SET
Throws:
ModelException - if impossible

getCollection

public PersistenceElementCollection getCollection()
Returns the field collection of this field group element. This method should only be used internally and for cloning and archiving.

Returns:
the field collection of this field group element

setCollection

public void setCollection(PersistenceElementCollection collection)
Set the field collection of this field group element to the supplied collection. This method should only be used internally and for cloning and archiving.

Parameters:
collection - the field collection of this field group element


Copyright © 2012 GlassFish Community. All Rights Reserved.