org.jooq.util
Interface Relations

All Known Implementing Classes:
DefaultRelations

public interface Relations

A model for all known Referenced Key / Referencing Key relations in the Database's schema.

Author:
Lukas Eder

Method Summary
 ForeignKeyDefinition getForeignKey(ColumnDefinition column)
          Get the foreign key for a given column, or null if that column is not part of a foreign key.
 List<ForeignKeyDefinition> getForeignKeys(TableDefinition table)
          Get a list of foreign keys for a given table.
 UniqueKeyDefinition getPrimaryKey(ColumnDefinition column)
          Get the the primary for a given column, or null if that column is not part of the primary key.
 List<UniqueKeyDefinition> getUniqueKeys(ColumnDefinition column)
          Get a list of referenced keys (primary or unique) for a given table, that the column participates in.
 List<UniqueKeyDefinition> getUniqueKeys(TableDefinition table)
          Get a list of referenced keys (primary or unique) for a given table.
 

Method Detail

getPrimaryKey

UniqueKeyDefinition getPrimaryKey(ColumnDefinition column)
Get the the primary for a given column, or null if that column is not part of the primary key.


getUniqueKeys

List<UniqueKeyDefinition> getUniqueKeys(ColumnDefinition column)
Get a list of referenced keys (primary or unique) for a given table, that the column participates in. Returns an empty list if the given column is not part of any primary key or unique key.


getUniqueKeys

List<UniqueKeyDefinition> getUniqueKeys(TableDefinition table)
Get a list of referenced keys (primary or unique) for a given table. Returns an empty list if the given table has no primary or unique keys.


getForeignKey

ForeignKeyDefinition getForeignKey(ColumnDefinition column)
Get the foreign key for a given column, or null if that column is not part of a foreign key.


getForeignKeys

List<ForeignKeyDefinition> getForeignKeys(TableDefinition table)
Get a list of foreign keys for a given table. Returns an empty list if the given table has no foreign keys.



Copyright © 2012. All Rights Reserved.