Class TableInfo
- java.lang.Object
-
- org.castor.cpa.persistence.sql.engine.info.TableInfo
-
public final class TableInfo extends java.lang.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
Constructors Modifier Constructor Description protected
TableInfo(java.lang.String tableName)
Constructor taking tableName in order to construct Table that holds his name only.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
java.util.List<ColumnInfo>
getColumns()
Method returning columns currently set.TableInfo
getExtendedTable()
Method returning extendedTable currently set.java.util.List<TableInfo>
getExtendingTables()
Method returning list of tables extending this one.java.util.List<TableLink>
getForeignKeys()
Method returning list of foreign keys.PrimaryKeyInfo
getPrimaryKey()
Get primary key of the table.java.lang.String
getTableName()
Method returning name of this table.java.util.List<ColumnInfo>
iterateAll()
Method returning list of all columns belonging to this table.protected void
setExtendedTable(TableInfo table)
java.util.List<ColumnValue>
toSQL(java.lang.Object[] input)
Method appending values from passed identity to corresponding columns.java.util.List<ColumnValue>
toSQL(Identity input)
Method appending values from passed identity to corresponding columns.
-
-
-
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 java.util.List<ColumnInfo> iterateAll()
Method returning list of all columns belonging to this table.- Returns:
- List of collected columns.
-
getTableName
public java.lang.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 java.util.List<TableInfo> getExtendingTables()
Method returning list of tables extending this one.- Returns:
- List of extending tables.
-
getColumns
public java.util.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 java.util.List<TableLink> getForeignKeys()
Method returning list of foreign keys.- Returns:
- List of foreign keys.
-
toSQL
public java.util.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 java.util.List<ColumnValue> toSQL(java.lang.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.
-
-