com.perdues.db
Class ColumnInfo

java.lang.Object
  |
  +--com.perdues.db.ColumnInfo

public class ColumnInfo
extends java.lang.Object


Constructor Summary
ColumnInfo(TableInfo table, XMLTag tag)
          This creates a ColumnInfo from a TableInfo object and an XMLTag.
 
Method Summary
 java.lang.String get(java.lang.String key)
          Returns the value of the named attribute of the XMLTag that defined this column, or null if none was specified.
 java.lang.String getCaption()
          Returns the user-oriented caption for the column.
 java.lang.String[] getChoices()
          Get an Enum field's choices as an array.
 java.lang.String[] getChoicesPlus(java.lang.String extra)
          Return the choices, with an extra string prepended.
 DBInfo getDatabase()
          Return the Schema for this Column.
 XMLTag[] getElements()
          Returns an array of XMLTag objects for the elements of the XML tag that defined this column.
 java.lang.String getFullName()
          Returns the fully-qualified name of this column, currently ..
 java.lang.String getName()
          Returns just the (unqualified) name of the column.
 TableInfo getTable()
          Returns the TableInfo this column belongs to.
 java.lang.String getType()
          Return the type string for the column as set from the Schema information.
 DBTypeHandler getTypeHandler()
           
 boolean isRequired()
          True if the column has the "required" attribute.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnInfo

public ColumnInfo(TableInfo table,
                  XMLTag tag)
This creates a ColumnInfo from a TableInfo object and an XMLTag. The tag should be of type "field".

XML attributes:

Specific field types may allow or require additional attributes in the XML tag. For example, some types of fields may have a maximum length. Some specific field types may have elements as well as attributes.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

public final java.lang.String getName()
Returns just the (unqualified) name of the column.

getFullName

public final java.lang.String getFullName()
Returns the fully-qualified name of this column, currently .. If the table has a shorthand, uses the shorthand.

getCaption

public final java.lang.String getCaption()
Returns the user-oriented caption for the column.

getTable

public final TableInfo getTable()
Returns the TableInfo this column belongs to.

getDatabase

public final DBInfo getDatabase()
Return the Schema for this Column.

getType

public final java.lang.String getType()
Return the type string for the column as set from the Schema information.

isRequired

public boolean isRequired()
True if the column has the "required" attribute.

getTypeHandler

public DBTypeHandler getTypeHandler()

get

public java.lang.String get(java.lang.String key)
Returns the value of the named attribute of the XMLTag that defined this column, or null if none was specified.

getElements

public XMLTag[] getElements()
Returns an array of XMLTag objects for the elements of the XML tag that defined this column.

getChoices

public final java.lang.String[] getChoices()
Get an Enum field's choices as an array. These are the value of the "choices" property, treated as a list delimited by "|" (vertical bars).

getChoicesPlus

public final java.lang.String[] getChoicesPlus(java.lang.String extra)
Return the choices, with an extra string prepended.