org.apache.ddlutils.io
Class Identity

java.lang.Object
  extended byorg.apache.ddlutils.io.Identity

public class Identity
extends Object

Stores the identity of an database object as defined by its primary keys. Is used by DataToDatabaseSink class for inserting objects in the correct order.

Version:
$Revision: 289996 $
Author:
Thomas Dudziak

Constructor Summary
Identity(String tableName)
          Creates a new identity object for the indicated table.
Identity(String tableName, String fkName)
          Creates a new identity object for the indicated table.
 
Method Summary
 boolean equals(Object obj)
          
 String getForeignKeyName()
          Returns the name of the foreign key whose referenced object this identity represents.
 int hashCode()
          
 void setIdentityColumn(String name, Object value)
          Specifies the value for one of the identity columns.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Identity

public Identity(String tableName)
Creates a new identity object for the indicated table.

Parameters:
tableName - The name of the table

Identity

public Identity(String tableName,
                String fkName)
Creates a new identity object for the indicated table.

Parameters:
tableName - The name of the table
fkName - The name of the foreign key whose referenced object this identity represents
Method Detail

getForeignKeyName

public String getForeignKeyName()
Returns the name of the foreign key whose referenced object this identity represents. This name is null if the identity is not for a foreign key, or if the foreign key was unnamed.

Returns:
The foreign key name

setIdentityColumn

public void setIdentityColumn(String name,
                              Object value)
Specifies the value for one of the identity columns.

Parameters:
name - The column name
value - The value for the column

equals

public boolean equals(Object obj)


hashCode

public int hashCode()


toString

public String toString()



Copyright © 2005 Apache Software Foundation. All Rights Reserved.