- java.lang.Object
-
- org.jooq.meta.AbstractDefinition
-
- org.jooq.meta.AbstractElementContainerDefinition<ColumnDefinition>
-
- org.jooq.meta.AbstractTableDefinition
-
- All Implemented Interfaces:
Definition,TableDefinition
- Direct Known Subclasses:
CUBRIDTableDefinition,DefaultMetaTableDefinition,DerbyTableDefinition,FirebirdTableDefinition,FirebirdTableValuedFunction,H2TableDefinition,HSQLDBTableDefinition,HSQLDBTableValuedFunction,MySQLTableDefinition,PostgresMaterializedViewDefinition,PostgresTableDefinition,PostgresTableValuedFunction,SQLiteTableDefinition,XMLTableDefinition
public abstract class AbstractTableDefinition extends AbstractElementContainerDefinition<ColumnDefinition> implements TableDefinition
A base implementation for table definitions.- Author:
- Lukas Eder
-
-
Field Summary
-
Fields inherited from class org.jooq.meta.AbstractElementContainerDefinition
PRECISION_SCALE
-
-
Constructor Summary
Constructors Constructor Description AbstractTableDefinition(SchemaDefinition schema, String name, String comment)AbstractTableDefinition(SchemaDefinition schema, String name, String comment, TableOptions.TableType tableType, String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<CheckConstraintDefinition>getCheckConstraints()Get theCHECKconstraints for this table.List<TableDefinition>getChildTables()Get the child tables if table inheritance is applicable.ColumnDefinitiongetColumn(int columnIndex)Get a column in this type by its index (starting at 0).ColumnDefinitiongetColumn(String columnName)Get a column in this type by its name.ColumnDefinitiongetColumn(String columnName, boolean ignoreCase)Get a column in this type by its name.List<ColumnDefinition>getColumns()All columns in the type, table or view.protected List<ColumnDefinition>getElements0()List<EmbeddableDefinition>getEmbeddables()All embeddable types in this defining table.List<ForeignKeyDefinition>getForeignKeys()Get the foreign keys for this table.List<ForeignKeyDefinition>getForeignKeys(TableDefinition referenced)Get the foreign keys for this table referencing a specific table.IdentityDefinitiongetIdentity()Get theIDENTITYcolumn of this table, ornull, if no such column exists.List<IndexDefinition>getIndexes()Get the indexes for this table.UniqueKeyDefinitiongetKey(String name)Get the unique key or primary key for this table by name.List<UniqueKeyDefinition>getKeys()Get the unique keys and primary keys for this table.List<ParameterDefinition>getParameters()The parameters of this table if this is a table-valued function.protected List<ParameterDefinition>getParameters0()TableDefinitiongetParentTable()Get the parent table if table inheritance is applicable.UniqueKeyDefinitiongetPrimaryKey()Get the primary key for this table.List<EmbeddableDefinition>getReferencedEmbeddables()All embeddable types in this referencing table.Table<Record>getTable()This TableDefinition as aTable.UniqueKeyDefinitiongetUniqueKey(String name)Get the unique key for this table by name.List<UniqueKeyDefinition>getUniqueKeys()Get the unique keys for this table.booleanisMaterializedView()Whether this table is a materialized view.booleanisSynthetic()Whether this table is a synthetic table (e.g. a synthetic view).booleanisTableValuedFunction()Whether this table is a table-valued function.booleanisTemporary()Whether this table is a temporary table.booleanisView()Whether this table is a view.voidsetParentTable(TableDefinition parentTable)-
Methods inherited from class org.jooq.meta.AbstractElementContainerDefinition
getElement, getElement, getElement, getElements, parseNotNull, parsePrecision, parseScale, parseTypeName
-
Methods inherited from class org.jooq.meta.AbstractDefinition
create, create, equals, getCatalog, getComment, getConnection, getDatabase, getDefinitionPath, getDialect, getInputName, getName, getOutputName, getOverload, getPackage, getQualifiedInputName, getQualifiedInputNamePart, getQualifiedName, getQualifiedNamePart, getQualifiedOutputName, getQualifiedOutputNamePart, getSchema, getSource, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jooq.meta.Definition
getCatalog, getComment, getDatabase, getDefinitionPath, getInputName, getName, getOutputName, getOverload, getPackage, getQualifiedInputName, getQualifiedInputNamePart, getQualifiedName, getQualifiedNamePart, getQualifiedOutputName, getQualifiedOutputNamePart, getSchema, getSource
-
-
-
-
Constructor Detail
-
AbstractTableDefinition
public AbstractTableDefinition(SchemaDefinition schema, String name, String comment)
-
AbstractTableDefinition
public AbstractTableDefinition(SchemaDefinition schema, String name, String comment, TableOptions.TableType tableType, String source)
-
-
Method Detail
-
isSynthetic
public boolean isSynthetic()
Description copied from interface:TableDefinitionWhether this table is a synthetic table (e.g. a synthetic view).- Specified by:
isSyntheticin interfaceTableDefinition
-
getEmbeddables
public final List<EmbeddableDefinition> getEmbeddables()
Description copied from interface:TableDefinitionAll embeddable types in this defining table.- Specified by:
getEmbeddablesin interfaceTableDefinition
-
getReferencedEmbeddables
public final List<EmbeddableDefinition> getReferencedEmbeddables()
Description copied from interface:TableDefinitionAll embeddable types in this referencing table.- Specified by:
getReferencedEmbeddablesin interfaceTableDefinition
-
getPrimaryKey
public final UniqueKeyDefinition getPrimaryKey()
Description copied from interface:TableDefinitionGet the primary key for this table.- Specified by:
getPrimaryKeyin interfaceTableDefinition
-
getIndexes
public final List<IndexDefinition> getIndexes()
Description copied from interface:TableDefinitionGet the indexes for this table.- Specified by:
getIndexesin interfaceTableDefinition
-
getUniqueKeys
public final List<UniqueKeyDefinition> getUniqueKeys()
Description copied from interface:TableDefinitionGet the unique keys for this table.- Specified by:
getUniqueKeysin interfaceTableDefinition
-
getUniqueKey
public final UniqueKeyDefinition getUniqueKey(String name)
Description copied from interface:TableDefinitionGet the unique key for this table by name.- Specified by:
getUniqueKeyin interfaceTableDefinition
-
getKeys
public final List<UniqueKeyDefinition> getKeys()
Description copied from interface:TableDefinitionGet the unique keys and primary keys for this table.- Specified by:
getKeysin interfaceTableDefinition
-
getKey
public final UniqueKeyDefinition getKey(String name)
Description copied from interface:TableDefinitionGet the unique key or primary key for this table by name.- Specified by:
getKeyin interfaceTableDefinition
-
getForeignKeys
public final List<ForeignKeyDefinition> getForeignKeys()
Description copied from interface:TableDefinitionGet the foreign keys for this table.- Specified by:
getForeignKeysin interfaceTableDefinition
-
getForeignKeys
public final List<ForeignKeyDefinition> getForeignKeys(TableDefinition referenced)
Description copied from interface:TableDefinitionGet the foreign keys for this table referencing a specific table.- Specified by:
getForeignKeysin interfaceTableDefinition
-
getCheckConstraints
public final List<CheckConstraintDefinition> getCheckConstraints()
Description copied from interface:TableDefinitionGet theCHECKconstraints for this table.- Specified by:
getCheckConstraintsin interfaceTableDefinition
-
getIdentity
public final IdentityDefinition getIdentity()
Description copied from interface:TableDefinitionGet theIDENTITYcolumn of this table, ornull, if no such column exists.- Specified by:
getIdentityin interfaceTableDefinition
-
setParentTable
public final void setParentTable(TableDefinition parentTable)
-
getParentTable
public final TableDefinition getParentTable()
Description copied from interface:TableDefinitionGet the parent table if table inheritance is applicable.- Specified by:
getParentTablein interfaceTableDefinition
-
getChildTables
public final List<TableDefinition> getChildTables()
Description copied from interface:TableDefinitionGet the child tables if table inheritance is applicable.- Specified by:
getChildTablesin interfaceTableDefinition
-
getTable
public final Table<Record> getTable()
Description copied from interface:TableDefinitionThis TableDefinition as aTable.- Specified by:
getTablein interfaceTableDefinition
-
getColumns
public final List<ColumnDefinition> getColumns()
Description copied from interface:TableDefinitionAll columns in the type, table or view.- Specified by:
getColumnsin interfaceTableDefinition
-
getColumn
public final ColumnDefinition getColumn(String columnName)
Description copied from interface:TableDefinitionGet a column in this type by its name.- Specified by:
getColumnin interfaceTableDefinition
-
getColumn
public final ColumnDefinition getColumn(String columnName, boolean ignoreCase)
Description copied from interface:TableDefinitionGet a column in this type by its name.- Specified by:
getColumnin interfaceTableDefinition
-
getColumn
public final ColumnDefinition getColumn(int columnIndex)
Description copied from interface:TableDefinitionGet a column in this type by its index (starting at 0).- Specified by:
getColumnin interfaceTableDefinition
-
getParameters
public final List<ParameterDefinition> getParameters()
Description copied from interface:TableDefinitionThe parameters of this table if this is a table-valued function.- Specified by:
getParametersin interfaceTableDefinition
-
isTemporary
public final boolean isTemporary()
Description copied from interface:TableDefinitionWhether this table is a temporary table.- Specified by:
isTemporaryin interfaceTableDefinition
-
isView
public final boolean isView()
Description copied from interface:TableDefinitionWhether this table is a view.- Specified by:
isViewin interfaceTableDefinition
-
isMaterializedView
public final boolean isMaterializedView()
Description copied from interface:TableDefinitionWhether this table is a materialized view.- Specified by:
isMaterializedViewin interfaceTableDefinition
-
isTableValuedFunction
public final boolean isTableValuedFunction()
Description copied from interface:TableDefinitionWhether this table is a table-valued function.- Specified by:
isTableValuedFunctionin interfaceTableDefinition
-
getElements0
protected List<ColumnDefinition> getElements0() throws SQLException
- Specified by:
getElements0in classAbstractElementContainerDefinition<ColumnDefinition>- Throws:
SQLException
-
getParameters0
protected List<ParameterDefinition> getParameters0()
-
-