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

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

public final class RelationTableInfo
extends TableInfo

Class representing a table for a many to many relation.

Version:
$Revision: 8994 $ $Date: 2011-08-02 01:40:59 +0200 (Di, 02 Aug 2011) $
Author:
Ralf Joachim

Constructor Summary
protected RelationTableInfo(String tableName)
          Constructor taking tableName in order to construct table that holds his name only.
 
Method Summary
 ForeignKeyInfo getLeftForeignKey()
          Get foreign key to left side of many to many relation.
 ForeignKeyInfo getRightForeignKey()
          Get foreign key to right side of many to many relation.
protected  void setLeftForeignKey(ForeignKeyInfo foreignKey)
          Set foreign key to left side of many to many relation.
protected  void setRightForeignKey(ForeignKeyInfo foreignKey)
          Set foreign key to right side of many to many relation.
 List<ColumnValue> toSQL(Identity left)
          Method appending values from passed identities to corresponding columns.
 List<ColumnValue> toSQL(Identity left, Identity right)
          Method appending values from passed identities to corresponding columns.
 
Methods inherited from class org.castor.cpa.persistence.sql.engine.info.TableInfo
getTableName, toSQL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationTableInfo

protected RelationTableInfo(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

setLeftForeignKey

protected void setLeftForeignKey(ForeignKeyInfo foreignKey)
Set foreign key to left side of many to many relation.

Parameters:
foreignKey - Foreign key to left side of many to many relation.

setRightForeignKey

protected void setRightForeignKey(ForeignKeyInfo foreignKey)
Set foreign key to right side of many to many relation.

Parameters:
foreignKey - Foreign key to right side of many to many relation.

getLeftForeignKey

public ForeignKeyInfo getLeftForeignKey()
Get foreign key to left side of many to many relation.

Returns:
Foreign key to left side of many to many relation.

getRightForeignKey

public ForeignKeyInfo getRightForeignKey()
Get foreign key to right side of many to many relation.

Returns:
Foreign key to right side of many to many relation.

toSQL

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

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

toSQL

public List<ColumnValue> toSQL(Identity left,
                               Identity right)
Method appending values from passed identities to corresponding columns.

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


Copyright © 2012. All Rights Reserved.