org.umber.catalan.process.workers.sql
Class SqlTable

java.lang.Object
  extended byorg.umber.catalan.process.workers.sql.SqlTable

public class SqlTable
extends java.lang.Object

Simple data holder for SQL table info.

Author:
jsheets

Constructor Summary
SqlTable()
          Creates a new instance of SqlTable.
 
Method Summary
 java.lang.String getCheckCondition()
          Retrieves the table-level CHECK condition.
 java.lang.String getDdl()
          Retrieves the original SQL DDL for the table.
 Field[] getFields()
          Retrieves all fields in this table
 Field[] getForeignKeys()
          Retrieves an array of all foreign key fields in this table.
 java.lang.String getName()
          Retrieves the name of the table.
 PropertyName getNameProperty()
          Retrieves the name of the table as a PropertyName object.
 Field[] getPrimaryKeys()
          Retrieves an array of all primary key fields in this table.
 void setCheckCondition(java.lang.String checkCondition)
          Assigns the table-level CHECK condition.
 void setDdl(java.lang.String ddl)
          Sets the original SQL DDL for the table.
 void setFields(Field[] fields)
          Assigns all fields in this table.
 void setForeignKeys(Field[] foreignKeys)
          Assigns an array of all foreign key fields in this table.
 void setName(java.lang.String name)
          Sets the table name.
 void setPrimaryKeys(Field[] primaryKeys)
          Assigns an array of all primary key fields in this table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlTable

public SqlTable()
Creates a new instance of SqlTable.

Method Detail

getDdl

public java.lang.String getDdl()
Retrieves the original SQL DDL for the table.

Returns:
DDL table content

setDdl

public void setDdl(java.lang.String ddl)
Sets the original SQL DDL for the table.

Parameters:
ddl - DDL table content

getName

public java.lang.String getName()
Retrieves the name of the table.

Returns:
table name

getNameProperty

public PropertyName getNameProperty()
Retrieves the name of the table as a PropertyName object.

Returns:
table name

setName

public void setName(java.lang.String name)
Sets the table name.

Parameters:
name - table name

getCheckCondition

public java.lang.String getCheckCondition()
Retrieves the table-level CHECK condition.

Returns:
CHECK condition

setCheckCondition

public void setCheckCondition(java.lang.String checkCondition)
Assigns the table-level CHECK condition.

Parameters:
checkCondition - CHECK condition

getFields

public Field[] getFields()
Retrieves all fields in this table

Returns:
table fields

setFields

public void setFields(Field[] fields)
Assigns all fields in this table.

Parameters:
fields - table fields

getForeignKeys

public Field[] getForeignKeys()
Retrieves an array of all foreign key fields in this table.

Returns:
foreign key fields

setForeignKeys

public void setForeignKeys(Field[] foreignKeys)
Assigns an array of all foreign key fields in this table.

Parameters:
foreignKeys - foreign key fields

getPrimaryKeys

public Field[] getPrimaryKeys()
Retrieves an array of all primary key fields in this table.

Returns:
primary key fields

setPrimaryKeys

public void setPrimaryKeys(Field[] primaryKeys)
Assigns an array of all primary key fields in this table.

Parameters:
primaryKeys - primary key fields