org.castor.cpa.persistence.sql.engine.info
Class TableInfo

java.lang.Object
  extended by org.castor.cpa.persistence.sql.engine.info.TableInfo

public final class TableInfo
extends Object

Class representing given table classes as Tables.

Version:
$Revision: 8469 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Dennis Butterstein, Ralf Joachim

Constructor Summary
protected TableInfo(String tableName)
          Constructor taking tableName in order to construct Table that holds his name only.
 
Method Summary
protected  void addColumn(ColumnInfo column)
          Method to add a single column to the columns list.
protected  void addExtendingTable(TableInfo table)
           
protected  void addForeignKey(TableLink foreignKey)
           
 List<ColumnInfo> getColumns()
          Method returning columns currently set.
 TableInfo getExtendedTable()
          Method returning extendedTable currently set.
 List<TableInfo> getExtendingTables()
          Method returning list of tables extending this one.
 List<TableLink> getForeignKeys()
          Method returning list of foreign keys.
 PrimaryKeyInfo getPrimaryKey()
          Get primary key of the table.
 String getTableName()
          Method returning name of this table.
 List<ColumnInfo> iterateAll()
          Method returning list of all columns belonging to this table.
protected  void setExtendedTable(TableInfo table)
           
 List<ColumnValue> toSQL(Identity input)
          Method appending values from passed identity to corresponding columns.
 List<ColumnValue> toSQL(Object[] input)
          Method appending values from passed identity to corresponding columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableInfo

protected TableInfo(String tableName)
Constructor taking tableName in order to construct Table that holds his name only.

Parameters:
tableName - Name of the table to be constructed.
Method Detail

setExtendedTable

protected void setExtendedTable(TableInfo table)

addExtendingTable

protected void addExtendingTable(TableInfo table)

addColumn

protected void addColumn(ColumnInfo column)
Method to add a single column to the columns list.

Parameters:
column - Column to be added.

addForeignKey

protected void addForeignKey(TableLink foreignKey)

iterateAll

public List<ColumnInfo> iterateAll()
Method returning list of all columns belonging to this table.

Returns:
List of collected columns.

getTableName

public String getTableName()
Method returning name of this table.

Returns:
Name of the table currently set.

getExtendedTable

public TableInfo getExtendedTable()
Method returning extendedTable currently set.

Returns:
ExtendedTable currently set.

getExtendingTables

public List<TableInfo> getExtendingTables()
Method returning list of tables extending this one.

Returns:
List of extending tables.

getColumns

public List<ColumnInfo> getColumns()
Method returning columns currently set.

Returns:
List of columns currently set.

getPrimaryKey

public PrimaryKeyInfo getPrimaryKey()
Get primary key of the table.

Returns:
Primary key of the table.

getForeignKeys

public List<TableLink> getForeignKeys()
Method returning list of foreign keys.

Returns:
List of foreign keys.

toSQL

public List<ColumnValue> toSQL(Identity input)
Method appending values from passed identity to corresponding columns.

Parameters:
input - Identity containing values to be assigned to corresponding columns.
Returns:
ArrayList containing all columns with their corresponding values.

toSQL

public List<ColumnValue> toSQL(Object[] input)
Method appending values from passed identity to corresponding columns.

Parameters:
input - Identity containing values to be assigned to corresponding columns.
Returns:
ArrayList containing all columns with their corresponding values.


Copyright © 2011. All Rights Reserved.