planetj.database.field
Class FieldSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--planetj.database.field.FieldSet
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable

public class FieldSet
extends ArrayList

A FieldSet is a group of fields which have been grouped together for display purposes

See Also:
Serialized Form

Field Summary
static short FIELDS
          Indicates that the FieldSet objects should contain Fields objects
static short NAMES
          Indicates that the FieldSet objects should contain the names of fields
 
Constructor Summary
FieldSet()
          FieldSet constructor comment.
 
Method Summary
 void addAttributeAfterTitle(String pAttribute)
          Sets the text, HTML, XML, etc...
 boolean containsOneOf(List fieldNames)
          Checks to see if this FieldSet contains one Field in the given List of Field names.
 boolean displayHeaderRow()
          True if header should be displayed.
 boolean displayHeaderRowAsLegend()
          True if header should be displayed as legend for html fieldset.
 boolean equals(Object pObj)
           
 String getAttributeAfterTitle()
          Returns the text, HTML, XML, etc...
static List getFieldNameSets(RowCollection pRc)
          Returns a List containing FieldSet objects.
 FieldSet getFieldSetForGivenFields(List pFieldNames)
          Get a FieldSet that contains only the given fields.
static List getFieldSets(List pFieldNameSets, Row pRow)
          Gets a List containing FieldSet objects.
static List getFieldSets(Row pRow)
          Gets a List containing FieldSet objects.
 String getName()
          Gets the name of this FieldSet
 boolean hasDisplayableFields(ExecutingContext ec)
           
 int hashCode()
           
 boolean remove(Object pObj)
           
 void setDisplayHeaderRow(boolean display)
          Set header to display.
 void setDisplayHeaderRowAsLegend(boolean isLegend)
          Set header to display.
 void setName(String newName)
          Sets the name of this FieldSet
 String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

NAMES

public static final short NAMES
Indicates that the FieldSet objects should contain the names of fields

See Also:
Constant Field Values

FIELDS

public static final short FIELDS
Indicates that the FieldSet objects should contain Fields objects

See Also:
Constant Field Values
Constructor Detail

FieldSet

public FieldSet()
FieldSet constructor comment.

Method Detail

addAttributeAfterTitle

public void addAttributeAfterTitle(String pAttribute)
Sets the text, HTML, XML, etc... that will appear after the FieldSet's title.


containsOneOf

public boolean containsOneOf(List fieldNames)
Checks to see if this FieldSet contains one Field in the given List of Field names.


displayHeaderRow

public boolean displayHeaderRow()
True if header should be displayed.


displayHeaderRowAsLegend

public boolean displayHeaderRowAsLegend()
True if header should be displayed as legend for html fieldset.


equals

public boolean equals(Object pObj)
Specified by:
equals in interface List
Overrides:
equals in class AbstractList

getAttributeAfterTitle

public String getAttributeAfterTitle()
Returns the text, HTML, XML, etc... that will appear after the FieldSet's title.


getFieldNameSets

public static List getFieldNameSets(RowCollection pRc)
                             throws CMException
Returns a List containing FieldSet objects. Each FieldSet object contains *NAMES* of fields that belong in that field set. This List represents a halfway point in the procedure required to get the fields in a field set - the rest of the procedure can only be done once we have a specific Row. The names may include the names of fields which aren't in the RowCollection, but exist in tables referenced by the RowCollection. At some point, Rows in the RowCollection may have those fields added. There will always be at least one FieldSet returned in the List (assuming any fields exist in the RowCollection), even if no field sets were specified in the field descriptors (in this case, the field set will not have a name).

CMException

getFieldSetForGivenFields

public FieldSet getFieldSetForGivenFields(List pFieldNames)
                                   throws CMException
Get a FieldSet that contains only the given fields.

CMException

getFieldSets

public static List getFieldSets(List pFieldNameSets,
                                Row pRow)
Gets a List containing FieldSet objects. Each FieldSet object contains the Field objects corresponding to the fields which are in the Row, and whose names are in the FieldSet passed in to this method.


getFieldSets

public static List getFieldSets(Row pRow)
                         throws CMException
Gets a List containing FieldSet objects. Each FieldSet object contains the Field objects corresponding to the fields which are in the Row, and whose names are in the FieldSet passed in to this method. This method is more expensive than the two argument version, but can be invoked for Rows which are not in a RowCollection.

CMException

getName

public String getName()
Gets the name of this FieldSet


hasDisplayableFields

public boolean hasDisplayableFields(ExecutingContext ec)
                             throws CMException
CMException

hashCode

public int hashCode()
Specified by:
hashCode in interface List
Overrides:
hashCode in class AbstractList

remove

public boolean remove(Object pObj)
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection

setDisplayHeaderRow

public void setDisplayHeaderRow(boolean display)
Set header to display.


setDisplayHeaderRowAsLegend

public void setDisplayHeaderRowAsLegend(boolean isLegend)
Set header to display.


setName

public void setName(String newName)
Sets the name of this FieldSet


toString

public String toString()
Overrides:
toString in class AbstractCollection