planetj.database.fielddescriptors
Class FieldDescriptorCollection

java.lang.Object
  |
  +--planetj.database.fielddescriptors.FieldDescriptorCollection

public class FieldDescriptorCollection
extends Object


Field Summary
static Comparator DISPLAY_ORDER_COMPARATOR
           
static Comparator NAME_COMPARATOR
           
static Comparator USAGE_ID_COMPARATOR
           
 
Constructor Summary
FieldDescriptorCollection()
          FieldDescriptorCollection constructor comment.
 
Method Summary
 FieldDescriptorRow add(FieldDescriptorRow pFD)
          Sets the Object with the specified key.
 FieldDescriptorRow add(FieldDescriptorRow pFD, boolean pReplace)
          Sets the Object with the specified key.
 FieldDescriptorRow add(TableDescriptor pTD, boolean pReplace)
          Sets the Object with the specified key.
 List get(Class pFieldClass)
          Returns a List FieldDescriptors with the that has a fieldClass which is equal or a subclass of pFieldClass
 FieldDescriptorRow get(String pFieldName)
          Returns the Object keyed by the given object.
 List getAutoIncrementFieldDescriptors()
          Returns a List containing all the FieldDescriptorRow objects which describe Auto-Increment fields in the table
static FieldDescriptorRow getFieldDescriptorById(int pId)
          Gets a field descriptor by ID
 Iterator getFieldDescriptors()
          Returns all the FieldDescriptors in an unmodifiable Iterator
 FieldDescriptorRow getFieldDescriptorsWithAssociation(int pAssId, int pAssFldId)
          Returns a IFieldDescriptor that has associations id and association field id as specified.
 Collection getFieldDescriptorsWithAssociations()
          Returns a Collection of the Field Descriptors that have associations specified.
 Iterator getFieldDescriptorsWithUsage()
          Returns an Iterator for all field descriptors that have a usage ID
 List getFieldDescriptorsWithUsageId(int usageId)
          Create and return a list of field descriptors in this collection that have the given usage id.
 FieldDescriptorRow getFieldDescriptorWithUsageId(int pUsageid)
          Return the FieldDescriptorRow for the Field with the specified usage id.
 List getFieldNames()
          Returns a List of the Field names for the Table.
 List getKeyFieldNames()
          Returns a List of the Field names for the Table.
 List getLogicalFieldNames()
          Returns a List of the Field names for the Table.
 List getOrderedFieldDescriptors()
          Returns a list of the field descriptors in order they were added to this FieldDescriptorCollection Creation date: (6/3/2002 8:07:16 PM)
 List getPhysicalFieldNames()
          Returns a List of the Field names for the Table.
 TableDescriptor getTableDescriptor()
          Gets the table descriptor
 List getTableVariableFieldDescriptors()
          Lists the field descriptors which describe table variable fields..
 FieldDescriptorCollection invalidFieldDescriptors()
          Sets all FieldDescriptors to invalid (or not current).
 boolean isEmpty()
          Returns whether or not there are any FieldDescriptorRows in this FieldDescriptorCollection.
 boolean isLogicalFieldDescriptorPresent()
          Tests if this collection of field descriptors contains one or more field descriptors which describe fields that are not physically present in the database.
 void remove(FieldDescriptorRow fd)
           
 void resetLogicalFieldDescriptorPresent()
          Resets the flag indicating if this field descriptor contains a logical field
 int size()
          Returns the number of FieldDescriptors in this collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPLAY_ORDER_COMPARATOR

public static final Comparator DISPLAY_ORDER_COMPARATOR

NAME_COMPARATOR

public static final Comparator NAME_COMPARATOR

USAGE_ID_COMPARATOR

public static final Comparator USAGE_ID_COMPARATOR
Constructor Detail

FieldDescriptorCollection

public FieldDescriptorCollection()
FieldDescriptorCollection constructor comment.

Method Detail

add

public FieldDescriptorRow add(FieldDescriptorRow pFD)
Sets the Object with the specified key.


add

public FieldDescriptorRow add(FieldDescriptorRow pFD,
                              boolean pReplace)
Sets the Object with the specified key.


add

public FieldDescriptorRow add(TableDescriptor pTD,
                              boolean pReplace)
Sets the Object with the specified key.


get

public List get(Class pFieldClass)
Returns a List FieldDescriptors with the that has a fieldClass which is equal or a subclass of pFieldClass


get

public FieldDescriptorRow get(String pFieldName)
Returns the Object keyed by the given object.


getAutoIncrementFieldDescriptors

public List getAutoIncrementFieldDescriptors()
Returns a List containing all the FieldDescriptorRow objects which describe Auto-Increment fields in the table


getFieldDescriptorById

public static FieldDescriptorRow getFieldDescriptorById(int pId)
                                                 throws CMException
Gets a field descriptor by ID

Parameters:
pId - The id of the FD to get
CMException

getFieldDescriptors

public Iterator getFieldDescriptors()
Returns all the FieldDescriptors in an unmodifiable Iterator


getFieldDescriptorsWithAssociation

public FieldDescriptorRow getFieldDescriptorsWithAssociation(int pAssId,
                                                             int pAssFldId)
Returns a IFieldDescriptor that has associations id and association field id as specified.


getFieldDescriptorsWithAssociations

public Collection getFieldDescriptorsWithAssociations()
Returns a Collection of the Field Descriptors that have associations specified.


getFieldDescriptorsWithUsage

public Iterator getFieldDescriptorsWithUsage()
Returns an Iterator for all field descriptors that have a usage ID


getFieldDescriptorsWithUsageId

public List getFieldDescriptorsWithUsageId(int usageId)
Create and return a list of field descriptors in this collection that have the given usage id.

Parameters:
usageId - usage id to get field descriptors
Returns:
List of FieldDescriptorRows

getFieldDescriptorWithUsageId

public FieldDescriptorRow getFieldDescriptorWithUsageId(int pUsageid)
Return the FieldDescriptorRow for the Field with the specified usage id.

Returns:
FieldDescriptorRow

getFieldNames

public List getFieldNames()
Returns a List of the Field names for the Table. This may include the names of fields which are not physically present in the database


getKeyFieldNames

public List getKeyFieldNames()
Returns a List of the Field names for the Table.


getLogicalFieldNames

public List getLogicalFieldNames()
Returns a List of the Field names for the Table. This will only include the names of fields which are not physically present in the database


getOrderedFieldDescriptors

public List getOrderedFieldDescriptors()
Returns a list of the field descriptors in order they were added to this FieldDescriptorCollection Creation date: (6/3/2002 8:07:16 PM)


getPhysicalFieldNames

public List getPhysicalFieldNames()
Returns a List of the Field names for the Table. This will only include the names of fields which are physically present in the database


getTableDescriptor

public TableDescriptor getTableDescriptor()
Gets the table descriptor


getTableVariableFieldDescriptors

public List getTableVariableFieldDescriptors()
Lists the field descriptors which describe table variable fields.. A table variable field is one whose value may need to be altered when copying a row from one table to another. By default, table variable fields are assumed to be the key fields, as well as any auto-increment fields


invalidFieldDescriptors

public FieldDescriptorCollection invalidFieldDescriptors()
Sets all FieldDescriptors to invalid (or not current). This is used when FDs are updated and we need to force Field's with cached FDs to invalid them.

Returns:
FieldDescriptorCollection

isEmpty

public boolean isEmpty()
Returns whether or not there are any FieldDescriptorRows in this FieldDescriptorCollection.


isLogicalFieldDescriptorPresent

public boolean isLogicalFieldDescriptorPresent()
Tests if this collection of field descriptors contains one or more field descriptors which describe fields that are not physically present in the database.


remove

public void remove(FieldDescriptorRow fd)

resetLogicalFieldDescriptorPresent

public void resetLogicalFieldDescriptorPresent()
Resets the flag indicating if this field descriptor contains a logical field


size

public int size()
Returns the number of FieldDescriptors in this collection.