Package org.jooq.meta

Interface TableDefinition

All Superinterfaces:
Definition
All Known Implementing Classes:
AbstractTableDefinition, CUBRIDTableDefinition, DefaultMetaTableDefinition, DerbyTableDefinition, FirebirdTableDefinition, FirebirdTableValuedFunction, H2TableDefinition, HSQLDBTableDefinition, HSQLDBTableValuedFunction, MySQLTableDefinition, PostgresMaterializedViewDefinition, PostgresTableDefinition, PostgresTableValuedFunction, SQLiteTableDefinition, XMLTableDefinition

public interface TableDefinition extends Definition
The definition of a table or view.
Author:
Lukas Eder
  • Method Details

    • getColumns

      List<ColumnDefinition> getColumns()
      All columns in the type, table or view.
    • getColumn

      ColumnDefinition getColumn(String columnName)
      Get a column in this type by its name.
    • getColumn

      ColumnDefinition getColumn(String columnName, boolean ignoreCase)
      Get a column in this type by its name.
    • getColumn

      ColumnDefinition getColumn(int columnIndex)
      Get a column in this type by its index (starting at 0).
    • isSynthetic

      boolean isSynthetic()
      Whether this table is a synthetic table (e.g. a synthetic view).
      Specified by:
      isSynthetic in interface Definition
    • getEmbeddables

      List<EmbeddableDefinition> getEmbeddables()
      All embeddable types in this defining table.
    • getReferencedEmbeddables

      List<EmbeddableDefinition> getReferencedEmbeddables()
      All embeddable types in this referencing table.
    • getIndexes

      List<IndexDefinition> getIndexes()
      Get the indexes for this table.
    • getPrimaryKey

      UniqueKeyDefinition getPrimaryKey()
      Get the primary key for this table.
    • getUniqueKeys

      List<UniqueKeyDefinition> getUniqueKeys()
      Get the unique keys for this table.
    • getUniqueKey

      UniqueKeyDefinition getUniqueKey(String name)
      Get the unique key for this table by name.
    • getKeys

      Get the unique keys and primary keys for this table.
    • getKey

      Get the unique key or primary key for this table by name.
    • getForeignKeys

      List<ForeignKeyDefinition> getForeignKeys()
      Get the foreign keys for this table.
    • getForeignKeys

      List<ForeignKeyDefinition> getForeignKeys(TableDefinition referenced)
      Get the foreign keys for this table referencing a specific table.
    • getCheckConstraints

      List<CheckConstraintDefinition> getCheckConstraints()
      Get the CHECK constraints for this table.
    • getIdentity

      IdentityDefinition getIdentity()
      Get the IDENTITY column of this table, or null, if no such column exists.
    • getParentTable

      TableDefinition getParentTable()
      Get the parent table if table inheritance is applicable.
    • getChildTables

      List<TableDefinition> getChildTables()
      Get the child tables if table inheritance is applicable.
    • getTable

      Table<Record> getTable()
      This TableDefinition as a Table.
    • getParameters

      List<ParameterDefinition> getParameters()
      The parameters of this table if this is a table-valued function.
    • isTemporary

      boolean isTemporary()
      Whether this table is a temporary table.
    • isView

      boolean isView()
      Whether this table is a view.
    • isMaterializedView

      boolean isMaterializedView()
      Whether this table is a materialized view.
    • isTableValuedFunction

      boolean isTableValuedFunction()
      Whether this table is a table-valued function.
    • getReferencedTable

      @NotNull @NotNull TableDefinition getReferencedTable()
      The referenced table type, if this isTableValuedFunction().

      This returns: