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.model
Class Reference

    java.lang.Object
      org.apache.ddlutils.model.Reference

All Implemented Interfaces:
  Serializable, Cloneable

    public class Reference

extends Object
implements Cloneable, Serializable

Represents a reference between a column in the local table and a column in another table.

Version:
  $Revision: 463305 $
See Also:
  Serialized Form

Constructor Summary
`Reference()` Creates a new, empty reference.
`Reference(Column localColumn, Column foreignColumn)` Creates a new reference between the two given columns.

Method Summary
`Object` | `clone()`
`boolean` | `equals(Object obj)`
`boolean` | `equalsIgnoreCase(Reference otherRef)` Compares this reference to the given one while ignoring the case of identifiers.
`Column` | `getForeignColumn()` Returns the foreign column.
`String` | `getForeignColumnName()` Returns the name of the foreign column.
`Column` | `getLocalColumn()` Returns the local column.
`String` | `getLocalColumnName()` Returns the name of the local column.
`int` | `getSequenceValue()` Returns the sequence value within the owning key.
`int` | `hashCode()`
`void` | `setForeignColumn(Column foreignColumn)` Sets the foreign column.
`void` | `setForeignColumnName(String foreignColumnName)` Sets the name of the remote column.
`void` | `setLocalColumn(Column localColumn)` Sets the local column.
`void` | `setLocalColumnName(String localColumnName)` Sets the name of the local column.
`void` | `setSequenceValue(int sequenceValue)` Sets the sequence value within the owning key.
`String` | `toString()`

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

Constructor Detail

### Reference

    public Reference()

  Creates a new, empty reference.

### Reference

    public Reference(Column localColumn,
                     Column foreignColumn)

  Creates a new reference between the two given columns.

  Parameters:
    `localColumn` - The local column
    `foreignColumn` - The remote column

Method Detail

### getSequenceValue

    public int getSequenceValue()

  Returns the sequence value within the owning key.

  Returns:
    The sequence value

### setSequenceValue

    public void setSequenceValue(int sequenceValue)

  Sets the sequence value within the owning key. Please note that you should not change the value once the reference has been added to a key.

  Parameters:
    `sequenceValue` - The sequence value

### getLocalColumn

    public Column getLocalColumn()

  Returns the local column.

  Returns:
    The local column

### setLocalColumn

    public void setLocalColumn(Column localColumn)

  Sets the local column.

  Parameters:
    `localColumn` - The local column

### getForeignColumn

    public Column getForeignColumn()

  Returns the foreign column.

  Returns:
    The foreign column

### setForeignColumn

    public void setForeignColumn(Column foreignColumn)

  Sets the foreign column.

  Parameters:
    `foreignColumn` - The foreign column

### getLocalColumnName

    public String getLocalColumnName()

  Returns the name of the local column.

  Returns:
    The column name

### setLocalColumnName

    public void setLocalColumnName(String localColumnName)

  Sets the name of the local column. Note that you should not use this method when manipulating the model manually. Rather use the `setLocalColumn(Column)` method.

  Parameters:
    `localColumnName` - The column name

### getForeignColumnName

    public String getForeignColumnName()

  Returns the name of the foreign column.

  Returns:
    The column name

### setForeignColumnName

    public void setForeignColumnName(String foreignColumnName)

  Sets the name of the remote column. Note that you should not use this method when manipulating the model manually. Rather use the `setForeignColumn(Column)` method.

  Parameters:
    `foreignColumnName` - The column name

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### equalsIgnoreCase

    public boolean equalsIgnoreCase(Reference otherRef)

  Compares this reference to the given one while ignoring the case of identifiers.

  Parameters:
    `otherRef` - The other reference
  Returns:
    `true` if this reference is equal (ignoring case) to the given one

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