toolbox.dao
Class FieldDefinition

Package class diagram package FieldDefinition
java.lang.Object
  extended by toolbox.dao.FieldDefinition

public class FieldDefinition
extends java.lang.Object

Encapsulates the definition of one database field.


Constructor Summary
FieldDefinition(java.lang.String name, java.lang.String type, java.lang.Integer typeInt, java.lang.String allowNull, java.lang.String keyType, java.lang.String defaultVal, java.lang.String extra)
          Creates a new FieldDefinition instance.
 
Method Summary
 java.lang.String getDefaultValue()
          Return this fields default value as a String.
 java.lang.String getExtra()
          Returns the value of the extra member.
 java.lang.String getKeyType()
          Return this fields key type.
 java.lang.String getName()
          Return this fields name.
 int getSQLType()
          Returns an int representing the SQL type of this field.
 java.lang.String getType()
          Return this fields type.
 boolean isNullable()
          Indicates whether or not this field allows null values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldDefinition

public FieldDefinition(java.lang.String name,
                       java.lang.String type,
                       java.lang.Integer typeInt,
                       java.lang.String allowNull,
                       java.lang.String keyType,
                       java.lang.String defaultVal,
                       java.lang.String extra)
Creates a new FieldDefinition instance.

Parameters:
name - Field name.
type - Field type.
typeInt - Field type as an int.
allowNull - Flag indicating whether or not this field is nullable.
keyType - Indicates whether or not this is a key field and also inidicates what kind of key.
defaultVal - Default value for this field.
extra - Contains additional information regarding this field.
Method Detail

getName

public java.lang.String getName()
Return this fields name.

Returns:
String containing this fields name.

getType

public java.lang.String getType()
Return this fields type.

Returns:
String containing this fields type.

isNullable

public boolean isNullable()
Indicates whether or not this field allows null values.

Returns:
boolean indicating whether or not this field is nullable.

getKeyType

public java.lang.String getKeyType()
Return this fields key type.

Returns:
String inidicating this fields key type.

getDefaultValue

public java.lang.String getDefaultValue()
Return this fields default value as a String.

Returns:
String containing the default value for this field.

getSQLType

public int getSQLType()
Returns an int representing the SQL type of this field.

Returns:
int representing the SQL type.

getExtra

public java.lang.String getExtra()
Returns the value of the extra member.

Returns:
String containing the extra member.