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
ConstructorsConstructorDescriptionAbstractTableDefinition(SchemaDefinition schema, String name, String comment) AbstractTableDefinition(SchemaDefinition schema, String name, String comment, TableOptions.TableType tableType, String source) AbstractTableDefinition(SchemaDefinition schema, String name, String comment, TableOptions.TableType tableType, String source, SchemaDefinition referencedSchema, String referencedName) -
Method Summary
Modifier and TypeMethodDescriptionfinal List<CheckConstraintDefinition> Get theCHECKconstraints for this table.final List<TableDefinition> Get the child tables if table inheritance is applicable.final ColumnDefinitiongetColumn(int columnIndex) Get a column in this type by its index (starting at 0).final ColumnDefinitionGet a column in this type by its name.final ColumnDefinitionGet a column in this type by its name.final List<ColumnDefinition> All columns in the type, table or view.final List<ColumnDefinition> All columns in the type, table or view, including hidden columns.protected List<ColumnDefinition> final List<EmbeddableDefinition> All embeddable types in this defining table.final List<ForeignKeyDefinition> Get the foreign keys for this table.final List<ForeignKeyDefinition> getForeignKeys(TableDefinition referenced) Get the foreign keys for this table referencing a specific table.final IdentityDefinitionGet theIDENTITYcolumn of this table, ornull, if no such column exists.final List<IndexDefinition> Get the indexes for this table.final List<InverseForeignKeyDefinition> Get the inverse foreign keys for this table.final List<InverseForeignKeyDefinition> getInverseForeignKeys(TableDefinition referencing) Get the inverse foreign keys for this table referenced from a specific table.final UniqueKeyDefinitionGet the unique key or primary key for this table by name.final List<UniqueKeyDefinition> getKeys()Get the unique keys and primary keys for this table.final List<ManyToManyKeyDefinition> Get the many to many keys for this table.final List<ManyToManyKeyDefinition> getManyToManyKeys(TableDefinition referencing) Get the many to many keys for this table referencing another, specific table.final List<ParameterDefinition> The parameters of this table if this is a table-valued function.protected List<ParameterDefinition> final TableDefinitionGet the parent table if table inheritance is applicable.final UniqueKeyDefinitionGet the primary key for this table.final List<EmbeddableDefinition> All embeddable types in this referencing table.final TableDefinitionThe referenced table type, if thisTableDefinition.isTableValuedFunction().final DefinitionThe referenced table or UDT type, if thisTableDefinition.isTableValuedFunction().getTable()This TableDefinition as aTable.final TableOptionsTheTableOptionsproviding additional information about the table.final UniqueKeyDefinitiongetUniqueKey(String name) Get the unique key for this table by name.final List<UniqueKeyDefinition> Get the unique keys for this table.final booleanWhether this table is a materialized view.booleanWhether this table is a synthetic table (e.g.final booleanWhether this table is a table-valued function.final booleanWhether this table is a temporary table.final booleanisView()Whether this table is a view.final voidsetParentTable(TableDefinition parentTable) Methods inherited from class org.jooq.meta.AbstractElementContainerDefinition
getElement, getElement, getElement, getElements, getElementsIncludingHidden, parseNotNull, parsePrecision, parseScale, parseTypeNameMethods inherited from class org.jooq.meta.AbstractDefinition
create, create, equals, getCatalog, getComment, getConnection, getDatabase, getDefinitionPath, getDialect, getInputName, getName, getOutputName, getOverload, getPackage, getPartiallyQualifiedNames, getQualifiedInputName, getQualifiedInputNamePart, getQualifiedName, getQualifiedNamePart, getQualifiedOutputName, getQualifiedOutputNamePart, getSchema, getSource, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jooq.meta.Definition
getCatalog, getComment, getDatabase, getDefinitionPath, getInputName, getName, getOutputName, getOverload, getPackage, getPartiallyQualifiedNames, getQualifiedInputName, getQualifiedInputNamePart, getQualifiedName, getQualifiedNamePart, getQualifiedOutputName, getQualifiedOutputNamePart, getSchema, getSource
-
Constructor Details
-
AbstractTableDefinition
-
AbstractTableDefinition
public AbstractTableDefinition(SchemaDefinition schema, String name, String comment, TableOptions.TableType tableType, String source) -
AbstractTableDefinition
public AbstractTableDefinition(SchemaDefinition schema, String name, String comment, TableOptions.TableType tableType, String source, SchemaDefinition referencedSchema, String referencedName)
-
-
Method Details
-
isSynthetic
public boolean isSynthetic()Description copied from interface:TableDefinitionWhether this table is a synthetic table (e.g. a synthetic view).- Specified by:
isSyntheticin interfaceDefinition- Specified by:
isSyntheticin interfaceTableDefinition
-
getEmbeddables
Description copied from interface:TableDefinitionAll embeddable types in this defining table.- Specified by:
getEmbeddablesin interfaceTableDefinition
-
getReferencedEmbeddables
Description copied from interface:TableDefinitionAll embeddable types in this referencing table.- Specified by:
getReferencedEmbeddablesin interfaceTableDefinition
-
getPrimaryKey
Description copied from interface:TableDefinitionGet the primary key for this table.- Specified by:
getPrimaryKeyin interfaceTableDefinition
-
getIndexes
Description copied from interface:TableDefinitionGet the indexes for this table.- Specified by:
getIndexesin interfaceTableDefinition
-
getUniqueKeys
Description copied from interface:TableDefinitionGet the unique keys for this table.- Specified by:
getUniqueKeysin interfaceTableDefinition
-
getUniqueKey
Description copied from interface:TableDefinitionGet the unique key for this table by name.- Specified by:
getUniqueKeyin interfaceTableDefinition
-
getKeys
Description copied from interface:TableDefinitionGet the unique keys and primary keys for this table.- Specified by:
getKeysin interfaceTableDefinition
-
getKey
Description copied from interface:TableDefinitionGet the unique key or primary key for this table by name.- Specified by:
getKeyin interfaceTableDefinition
-
getForeignKeys
Description copied from interface:TableDefinitionGet the foreign keys for this table.- Specified by:
getForeignKeysin interfaceTableDefinition
-
getForeignKeys
Description copied from interface:TableDefinitionGet the foreign keys for this table referencing a specific table.- Specified by:
getForeignKeysin interfaceTableDefinition
-
getInverseForeignKeys
Description copied from interface:TableDefinitionGet the inverse foreign keys for this table.- Specified by:
getInverseForeignKeysin interfaceTableDefinition
-
getInverseForeignKeys
Description copied from interface:TableDefinitionGet the inverse foreign keys for this table referenced from a specific table.- Specified by:
getInverseForeignKeysin interfaceTableDefinition
-
getManyToManyKeys
Description copied from interface:TableDefinitionGet the many to many keys for this table.- Specified by:
getManyToManyKeysin interfaceTableDefinition
-
getManyToManyKeys
Description copied from interface:TableDefinitionGet the many to many keys for this table referencing another, specific table.- Specified by:
getManyToManyKeysin interfaceTableDefinition
-
getCheckConstraints
Description copied from interface:TableDefinitionGet theCHECKconstraints for this table.- Specified by:
getCheckConstraintsin interfaceTableDefinition
-
getIdentity
Description copied from interface:TableDefinitionGet theIDENTITYcolumn of this table, ornull, if no such column exists.- Specified by:
getIdentityin interfaceTableDefinition
-
setParentTable
-
getParentTable
Description copied from interface:TableDefinitionGet the parent table if table inheritance is applicable.- Specified by:
getParentTablein interfaceTableDefinition
-
getChildTables
Description copied from interface:TableDefinitionGet the child tables if table inheritance is applicable.- Specified by:
getChildTablesin interfaceTableDefinition
-
getTable
Description copied from interface:TableDefinitionThis TableDefinition as aTable.- Specified by:
getTablein interfaceTableDefinition
-
getTableOptions
Description copied from interface:TableDefinitionTheTableOptionsproviding additional information about the table.- Specified by:
getTableOptionsin interfaceTableDefinition
-
getColumns
Description copied from interface:TableDefinitionAll columns in the type, table or view.- Specified by:
getColumnsin interfaceTableDefinition
-
getColumnsIncludingHidden
Description copied from interface:TableDefinitionAll columns in the type, table or view, including hidden columns.- Specified by:
getColumnsIncludingHiddenin interfaceTableDefinition
-
getColumn
Description copied from interface:TableDefinitionGet a column in this type by its name.- Specified by:
getColumnin interfaceTableDefinition
-
getColumn
Description copied from interface:TableDefinitionGet a column in this type by its name.- Specified by:
getColumnin interfaceTableDefinition
-
getColumn
Description copied from interface:TableDefinitionGet a column in this type by its index (starting at 0).- Specified by:
getColumnin interfaceTableDefinition
-
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
-
getReferencedTable
Description copied from interface:TableDefinitionThe referenced table type, if thisTableDefinition.isTableValuedFunction().This returns:
this, ifTableDefinition.isTableValuedFunction()==falsethis, ifTableDefinition.isTableValuedFunction()==truebut the table valued function doesn't reference a table type- Another table, if
TableDefinition.isTableValuedFunction()==trueand the table valued function references a table type
- Specified by:
getReferencedTablein interfaceTableDefinition
-
getReferencedTableOrUDT
Description copied from interface:TableDefinitionThe referenced table or UDT type, if thisTableDefinition.isTableValuedFunction().This returns:
this, ifTableDefinition.isTableValuedFunction()==falsethis, ifTableDefinition.isTableValuedFunction()==truebut the table valued function doesn't reference a table type- Another
TableDefinitionorUDTDefinition, ifTableDefinition.isTableValuedFunction()==trueand the table valued function references a table type
- Specified by:
getReferencedTableOrUDTin interfaceTableDefinition
-
getElements0
- Specified by:
getElements0in classAbstractElementContainerDefinition<ColumnDefinition>- Throws:
SQLException
-
getParameters0
-