edu.unh.sdb.common
Class RecordDescriptorBuilder

java.lang.Object
  extended by edu.unh.sdb.common.UserTypeBuilder
      extended by edu.unh.sdb.common.RecordDescriptorBuilder

public class RecordDescriptorBuilder
extends UserTypeBuilder

Manufactures Record Descriptor objects. Hold relevant data and validates before instantiating the appropriate objects.


Field Summary
protected  java.util.Vector fieldNames
          Declares a vector to hold the field name strings
protected  java.util.Vector fieldTypes
          Declares a vector to hold the field type strings
 
Fields inherited from class edu.unh.sdb.common.UserTypeBuilder
storageType
 
Constructor Summary
RecordDescriptorBuilder(java.lang.String n)
          Default constructor takes a string name and array of attributes (fields)
RecordDescriptorBuilder(java.lang.String n, AttributeDescriptor[] attrs)
          Overridden constructor takes a string name and array of attributes (fields)
RecordDescriptorBuilder(java.lang.String n, TypeTable types, AttributeDescriptor[] attrs)
          Overridden constructor takes a string name, string storage type, a low/high range and an exceptional value.
 
Method Summary
 void addField(java.lang.String n, java.lang.String t)
          adds a field name and type to the list for the pending record descriptor
 AttributeDescriptor[] getAttributes()
          Gets the attributes for this RD
 TypeTable getTypes()
          Returns the type table.
 UserType makeUserType()
          Returns a UserType object that has been instantiated as a RangedUserType object.
 void setAttributes(AttributeDescriptor[] a)
          Sets the attributes to cloned objects passed in the argument
 void setTypes(TypeTable t)
          Sets the type table.
 java.lang.String toString()
          diagnostic utility method for dumping this class to a string
 
Methods inherited from class edu.unh.sdb.common.UserTypeBuilder
getName, getStorageTypeName, getStorageTypeValue, setName, setStorageType, setStorageType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldNames

protected java.util.Vector fieldNames
Declares a vector to hold the field name strings


fieldTypes

protected java.util.Vector fieldTypes
Declares a vector to hold the field type strings

Constructor Detail

RecordDescriptorBuilder

public RecordDescriptorBuilder(java.lang.String n)
Default constructor takes a string name and array of attributes (fields)


RecordDescriptorBuilder

public RecordDescriptorBuilder(java.lang.String n,
                               AttributeDescriptor[] attrs)
Overridden constructor takes a string name and array of attributes (fields)


RecordDescriptorBuilder

public RecordDescriptorBuilder(java.lang.String n,
                               TypeTable types,
                               AttributeDescriptor[] attrs)
Overridden constructor takes a string name, string storage type, a low/high range and an exceptional value.

Method Detail

setTypes

public void setTypes(TypeTable t)
Sets the type table.


getTypes

public TypeTable getTypes()
Returns the type table.


setAttributes

public void setAttributes(AttributeDescriptor[] a)
Sets the attributes to cloned objects passed in the argument


getAttributes

public AttributeDescriptor[] getAttributes()
Gets the attributes for this RD


addField

public void addField(java.lang.String n,
                     java.lang.String t)
adds a field name and type to the list for the pending record descriptor


makeUserType

public UserType makeUserType()
Returns a UserType object that has been instantiated as a RangedUserType object. If unable to create the object a null Type object will be returned.

Overrides:
makeUserType in class UserTypeBuilder

toString

public java.lang.String toString()
diagnostic utility method for dumping this class to a string

Overrides:
toString in class UserTypeBuilder