FileDocCategorySizeDatePackage
FieldGroupElementImpl.javaAPI DocGlassfish v2 API4434Fri May 04 22:34:44 BST 2007com.sun.jdo.api.persistence.model.jdo.impl

FieldGroupElementImpl

public class FieldGroupElementImpl extends PersistenceMemberElementImpl implements FieldGroupElement.Impl
author
raccah
version
%I%

Fields Summary
private PersistenceElementCollection
_fields
Fields of the field group element.
Constructors Summary
public FieldGroupElementImpl()
Create new FieldGroupElementImpl with no corresponding name. This constructor should only be used for cloning and archiving.

		this(null);
	
public FieldGroupElementImpl(String name)
Creates new FieldGroupElementImpl with the corresponding name

param
name the name of the element

		super(name);
		_fields = new PersistenceElementCollection(this, PROP_FIELDS, 
			new PersistenceFieldElement[0]);
	
Methods Summary
public voidchangeFields(com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement[] fields, int action)
Change the set of fields.

param
fields the new fields
param
action {@link #ADD}, {@link #REMOVE}, or {@link #SET}
exception
ModelException if impossible

		_fields.changeElements(fields, action);
	
public PersistenceElementCollectiongetCollection()
Returns the field collection of this field group element. This method should only be used internally and for cloning and archiving.

return
the field collection of this field group element

 return _fields; 
public com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElementgetField(java.lang.String name)
Find a field by name.

param
name the name to match
return
the field, or null if it does not exist

		return (PersistenceFieldElement)_fields.getElement(name);
	
public com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement[]getFields()
Get all fields.

return
the fields

		return (PersistenceFieldElement[])_fields.getElements();
	
public voidsetCollection(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.

param
collection the field collection of this field group element

		_fields = collection;