Package org.apache.torque.map

# Klasse ForeignKeyMap

java.lang.Object
org.apache.torque.map.ForeignKeyMap

Alle implementierten Schnittstellen:
  `Serializable`

public class ForeignKeyMap extends Object implements Serializable
ForeignKeyMap is used to model a foreign key in a database.

Version:
  $Id: ForeignKeyMap.java 1839288 2018-08-27 09:48:33Z tv $
Siehe auch:
  - Serialisierte Form

- ## Verschachtelte Klassen - Übersicht

  Verschachtelte Klassen
  Modifizierer und Typ
  Klasse
  Beschreibung
  `static class`
  `ForeignKeyMap.ColumnPair`
  A pair of local and Foreign column.

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `ForeignKeyMap(TableMap table, String foreignTableName)`
  Constructor.
  `ForeignKeyMap(TableMap table, TableMap foreignTable)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `void`
  `addColumns(ForeignKeyMap.ColumnPair columnPair)`
  Adds a column pair to the foreign key.
  `List<ForeignKeyMap.ColumnPair>`
  `getColumns()`
  Returns the column pairs.
  `TableMap`
  `getForeignTable()`
  Returns the foreign table of the foreign key.
  `String`
  `getForeignTableName()`
  Returns name of the foreign table of the foreign key.
  `TableMap`
  `getTable()`
  Returns the local table of the foreign key.

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Konstruktordetails

  - ### ForeignKeyMap

    public ForeignKeyMap(TableMap table, TableMap foreignTable)
    Constructor.
    Parameter:
      `table` - the local table, not null.
      `foreignTable` - the foreign table, not null.
    Löst aus:
      `NullPointerException` - if an argument is null.

  - ### ForeignKeyMap

    public ForeignKeyMap(TableMap table, String foreignTableName)
    Constructor.
    Parameter:
      `table` - the local table, not null.
      `foreignTableName` - the name of the foreign table, not null.
    Löst aus:
      `NullPointerException` - if an argument is null.

- ## Methodendetails

  - ### addColumns

    public void addColumns(ForeignKeyMap.ColumnPair columnPair)
    Adds a column pair to the foreign key.
    Parameter:
      `columnPair` - the column pair to add, not null.

  - ### getTable

    public TableMap getTable()
    Returns the local table of the foreign key.
    Gibt zurück:
      the referencing table, not null.

  - ### getForeignTable

    public TableMap getForeignTable()
    Returns the foreign table of the foreign key.
    Gibt zurück:
      the referenced table, not null.
    Löst aus:
      `IllegalStateException` - if the foreign table map builder was not yet built.

  - ### getForeignTableName

    public String getForeignTableName()
    Returns name of the foreign table of the foreign key.
    Gibt zurück:
      the name of the referenced table, not null.

  - ### getColumns

    public List<ForeignKeyMap.ColumnPair> getColumns()
    Returns the column pairs.
    Gibt zurück:
      the column pairs, not null, as unmodifiable list.