- java.lang.Object
-
- org.tentackle.sql.metadata.ForeignKeyColumnMetaData
-
- All Implemented Interfaces:
java.lang.Comparable<ForeignKeyColumnMetaData>
public class ForeignKeyColumnMetaData extends java.lang.Object implements java.lang.Comparable<ForeignKeyColumnMetaData>
Meta data for a column of a foreign key.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ForeignKeyColumnMetaData(ForeignKeyMetaData foreignKeyMetaData)Creates a foreign key column.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ForeignKeyColumnMetaData o)java.lang.StringgetForeignKeyColumn()Gets the referencing column.ForeignKeyMetaDatagetForeignKeyMetaData()Gets the foreign key.intgetPosition()Gets the ordinal position within the index.java.lang.StringgetPrimaryKeyColumn()Gets the primary key column.voidsetForeignKeyColumn(java.lang.String foreignKeyColumn)Sets the referencing column.voidsetPosition(int position)Sets the ordinal position within the index.voidsetPrimaryKeyColumn(java.lang.String primaryKeyColumn)Sets the primary key column.voidsetupForeignKeyColumnFromMetaData(java.sql.ResultSet resultSet)Sets up the foreign key column from the database meta data result.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ForeignKeyColumnMetaData
public ForeignKeyColumnMetaData(ForeignKeyMetaData foreignKeyMetaData)
Creates a foreign key column.- Parameters:
foreignKeyMetaData- the foreign key column belongs to
-
-
Method Detail
-
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 java.lang.String getForeignKeyColumn()
Gets the referencing column.- Returns:
- the column name
-
setForeignKeyColumn
public void setForeignKeyColumn(java.lang.String foreignKeyColumn)
Sets the referencing column.- Parameters:
foreignKeyColumn- the column name
-
getPrimaryKeyColumn
public java.lang.String getPrimaryKeyColumn()
Gets the primary key column.- Returns:
- the column name
-
setPrimaryKeyColumn
public void setPrimaryKeyColumn(java.lang.String primaryKeyColumn)
Sets the primary key column.- Parameters:
primaryKeyColumn- the column name
-
setupForeignKeyColumnFromMetaData
public void setupForeignKeyColumnFromMetaData(java.sql.ResultSet resultSet) throws java.sql.SQLExceptionSets up the foreign key column from the database meta data result.- Parameters:
resultSet- the column result set- Throws:
java.sql.SQLException- the processing the result set failed
-
compareTo
public int compareTo(ForeignKeyColumnMetaData o)
- Specified by:
compareToin interfacejava.lang.Comparable<ForeignKeyColumnMetaData>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-