|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.dao.TableDefinition
public class TableDefinition
Encapsulates the definition of a single table.
Constructor Summary | |
---|---|
TableDefinition(java.lang.String tableName)
Creates a new definition with the given table name. |
Method Summary | |
---|---|
void |
addFieldDefinition(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)
Add a field definition to this table definition. |
FieldDefinition |
getFieldDefinition(java.lang.String name)
Returns the named FieldDefinition. |
java.lang.String[] |
getFieldNames()
Returns a String array of field names contained in this definition. |
FieldDefinition[] |
getPrimaryKeyDefinition()
Returns the primary key definition for this table definition. |
java.lang.String[] |
getPrimaryKeyNames()
Returns the names of the primary key fields of this definition |
int[] |
getSQLTypes()
Return an int array containing the SQL types of all the fields in this definition. |
java.lang.String |
getTableName()
Returns the name of his table definition. |
boolean |
isPrimaryKey(java.lang.String fieldName)
Test to see if the given field name is containend in the primary key definition of this table definition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableDefinition(java.lang.String tableName)
tableName
- Name of table defined by this object.Method Detail |
---|
public java.lang.String getTableName()
public void addFieldDefinition(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)
name
- Field name.type
- Field type.typeInt
- Field type as an Integer.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 the field.public FieldDefinition getFieldDefinition(java.lang.String name)
name
- Name of the field to return.
public java.lang.String[] getFieldNames()
public int[] getSQLTypes()
public java.lang.String[] getPrimaryKeyNames()
public FieldDefinition[] getPrimaryKeyDefinition()
public boolean isPrimaryKey(java.lang.String fieldName)
fieldName
- Name of field to test.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |