Class ForeignKeyColumnMetaData

java.lang.Object
org.tentackle.sql.metadata.ForeignKeyColumnMetaData
All Implemented Interfaces:
Comparable<ForeignKeyColumnMetaData>

public class ForeignKeyColumnMetaData extends Object implements Comparable<ForeignKeyColumnMetaData>
Metadata for a column of a foreign key.
Author:
harald
  • Constructor Details

    • ForeignKeyColumnMetaData

      public ForeignKeyColumnMetaData(ForeignKeyMetaData foreignKeyMetaData)
      Creates a foreign key column.
      Parameters:
      foreignKeyMetaData - the foreign key column belongs to
  • Method Details

    • getForeignKeyMetaData

      public ForeignKeyMetaData getForeignKeyMetaData()
      Gets the foreign key.
      Returns:
      the foreign key this column belongs to
    • getPosition

      public int getPosition()
      Gets the ordinal position within the index.
      Returns:
      the position
    • setPosition

      public void setPosition(int position)
      Sets the ordinal position within the index.
      Parameters:
      position - the position
    • getForeignKeyColumn

      public String getForeignKeyColumn()
      Gets the referencing column.
      Returns:
      the column name
    • setForeignKeyColumn

      public void setForeignKeyColumn(String foreignKeyColumn)
      Sets the referencing column.
      Parameters:
      foreignKeyColumn - the column name
    • getPrimaryKeyColumn

      public String getPrimaryKeyColumn()
      Gets the primary key column.
      Returns:
      the column name
    • setPrimaryKeyColumn

      public void setPrimaryKeyColumn(String primaryKeyColumn)
      Sets the primary key column.
      Parameters:
      primaryKeyColumn - the column name
    • setupForeignKeyColumnFromMetaData

      public void setupForeignKeyColumnFromMetaData(ResultSet resultSet) throws SQLException
      Sets up the foreign key column from the database metadata result.
      Parameters:
      resultSet - the column result set
      Throws:
      SQLException - the processing the result set failed
    • compareTo

      public int compareTo(ForeignKeyColumnMetaData o)
      Specified by:
      compareTo in interface Comparable<ForeignKeyColumnMetaData>
    • toString

      public String toString()
      Overrides:
      toString in class Object