Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.io
Class Identity

    java.lang.Object
      org.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 $

Constructor Summary
`Identity(Table table)` Creates a new identity object for the given table.
`Identity(Table table, String fkName)` Creates a new identity object for the given table.

Method Summary
`boolean` | `equals(Object obj)`
`Object` | `getColumnValue(String name)` Returns the value of the indicated identity columns.
`String` | `getForeignKeyName()` Returns the name of the foreign key whose referenced object this identity represents.
`Table` | `getTable()` Returns the table that this identity is for.
`int` | `hashCode()`
`void` | `setColumnValue(String name, Object value)` Specifies the value of the indicated identity columns.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Identity

    public Identity(Table table)

  Creates a new identity object for the given table.

  Parameters:
    `table` - The name of the table

### Identity

    public Identity(Table table,
                    String fkName)

  Creates a new identity object for the given table.

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

Method Detail

### getTable

    public Table getTable()

  Returns the table that this identity is for.

  Returns:
    The table

### 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

### setColumnValue

    public void setColumnValue(String name,
                               Object value)

  Specifies the value of the indicated identity columns.

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

### getColumnValue

    public Object getColumnValue(String name)

  Returns the value of the indicated identity columns.

  Parameters:
    `name` - The column name
  Returns:
    The column's value

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.