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 Summary
ConstructorsConstructorDescriptionForeignKeyColumnMetaData(ForeignKeyMetaData foreignKeyMetaData) Creates a foreign key column. -
Method Summary
Modifier and TypeMethodDescriptionintGets the referencing column.Gets the foreign key.intGets the ordinal position within the index.Gets the primary key column.voidsetForeignKeyColumn(String foreignKeyColumn) Sets the referencing column.voidsetPosition(int position) Sets the ordinal position within the index.voidsetPrimaryKeyColumn(String primaryKeyColumn) Sets the primary key column.voidsetupForeignKeyColumnFromMetaData(ResultSet resultSet) Sets up the foreign key column from the database metadata result.toString()
-
Constructor Details
-
ForeignKeyColumnMetaData
Creates a foreign key column.- Parameters:
foreignKeyMetaData- the foreign key column belongs to
-
-
Method Details
-
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
Gets the referencing column.- Returns:
- the column name
-
setForeignKeyColumn
Sets the referencing column.- Parameters:
foreignKeyColumn- the column name
-
getPrimaryKeyColumn
Gets the primary key column.- Returns:
- the column name
-
setPrimaryKeyColumn
Sets the primary key column.- Parameters:
primaryKeyColumn- the column name
-
setupForeignKeyColumnFromMetaData
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
- Specified by:
compareToin interfaceComparable<ForeignKeyColumnMetaData>
-
toString
-