org.apache.cayenne.map.naming

## Class ExportedKey

- java.lang.Object
- - org.apache.cayenne.map.naming.ExportedKey

-     public class ExportedKey
      extends Object

  ExportedKey is an representation of relationship between two tables in database. It can be used for creating names for relationships

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExportedKey(String pkTable, String pkColumn, String pkName, String fkTable, String fkColumn, String fkName)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ExportedKey` | `extractData(ResultSet rs)` Extracts data from a resultset pointing to a exported key to ExportedKey class instance
    `String` | `getFKColumnName()`
    `String` | `getFKName()`
    `String` | `getFKTableName()`
    `String` | `getPKColumnName()`
    `String` | `getPKName()`
    `String` | `getPKTableName()`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### ExportedKey

          public ExportedKey(String pkTable,
                             String pkColumn,
                             String pkName,
                             String fkTable,
                             String fkColumn,
                             String fkName)

  - ### Method Detail

    - #### extractData

          public static ExportedKey extractData(ResultSet rs)
                                         throws SQLException

      Extracts data from a resultset pointing to a exported key to ExportedKey class instance
      Parameters:
        `rs` - ResultSet pointing to a exported key, fetched using DataBaseMetaData.getExportedKeys(...)
      Throws:
        `SQLException`

    - #### getPKTableName

          public String getPKTableName()

      Returns:
        source table name

    - #### getFKTableName

          public String getFKTableName()

      Returns:
        destination table name

    - #### getPKColumnName

          public String getPKColumnName()

      Returns:
        source column name

    - #### getFKColumnName

          public String getFKColumnName()

      Returns:
        destination column name

    - #### getPKName

          public String getPKName()

      Returns:
        PK name

    - #### getFKName

          public String getFKName()

      Returns:
        FK name

Copyright © 2001–2018 Apache Cayenne. All rights reserved.