org.jooq.util
Class AbstractTableDefinition

java.lang.Object
  extended by org.jooq.util.AbstractDefinition
      extended by org.jooq.util.AbstractElementContainerDefinition<ColumnDefinition>
          extended by org.jooq.util.AbstractTableDefinition
All Implemented Interfaces:
Definition, TableDefinition
Direct Known Subclasses:
ASETableDefinition, CUBRIDTableDefinition, DB2TableDefinition, DerbyTableDefinition, H2TableDefinition, HSQLDBTableDefinition, IngresTableDefinition, MySQLTableDefinition, OracleTableDefinition, PostgresTableDefinition, SQLiteTableDefinition, SQLServerTableDefinition, SybaseTableDefinition

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.util.AbstractElementContainerDefinition
PRECISION_SCALE
 
Constructor Summary
AbstractTableDefinition(SchemaDefinition schema, String name, String comment)
           
 
Method Summary
 ColumnDefinition getColumn(int columnIndex)
          Get a column in this type by its index (starting at 0)
 ColumnDefinition getColumn(String columnName)
          Get a column in this type by its name
 ColumnDefinition getColumn(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<ForeignKeyDefinition> getForeignKeys()
          Get the foreign keys for this table
 ColumnDefinition getIdentity()
          Get the IDENTITY column of this table, or null, if no such column exists.
 UniqueKeyDefinition getMainUniqueKey()
          Get the primary key or the main unique key for this table
 org.jooq.Table<org.jooq.Record> getTable()
          This TableDefinition as a Table
 List<UniqueKeyDefinition> getUniqueKeys()
          Get the unique keys for this table
 
Methods inherited from class org.jooq.util.AbstractElementContainerDefinition
getDefinitionPath, getElement, getElement, getElement, getElements, parseNotNull, parsePrecision, parseScale
 
Methods inherited from class org.jooq.util.AbstractDefinition
create, equals, getComment, getConnection, getDatabase, getDialect, getInputName, getName, getOutputName, getOverload, getQualifiedInputName, getQualifiedName, getQualifiedOutputName, getSchema, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jooq.util.Definition
getComment, getDatabase, getDefinitionPath, getInputName, getName, getOutputName, getOverload, getQualifiedInputName, getQualifiedName, getQualifiedOutputName, getSchema
 

Constructor Detail

AbstractTableDefinition

public AbstractTableDefinition(SchemaDefinition schema,
                               String name,
                               String comment)
Method Detail

getMainUniqueKey

public final UniqueKeyDefinition getMainUniqueKey()
Description copied from interface: TableDefinition
Get the primary key or the main unique key for this table

Specified by:
getMainUniqueKey in interface TableDefinition

getUniqueKeys

public final List<UniqueKeyDefinition> getUniqueKeys()
Description copied from interface: TableDefinition
Get the unique keys for this table

Specified by:
getUniqueKeys in interface TableDefinition

getForeignKeys

public final List<ForeignKeyDefinition> getForeignKeys()
Description copied from interface: TableDefinition
Get the foreign keys for this table

Specified by:
getForeignKeys in interface TableDefinition

getIdentity

public final ColumnDefinition getIdentity()
Description copied from interface: TableDefinition
Get the IDENTITY column of this table, or null, if no such column exists.

Specified by:
getIdentity in interface TableDefinition

getTable

public final org.jooq.Table<org.jooq.Record> getTable()
Description copied from interface: TableDefinition
This TableDefinition as a Table

Specified by:
getTable in interface TableDefinition

getColumns

public final List<ColumnDefinition> getColumns()
Description copied from interface: TableDefinition
All columns in the type, table or view

Specified by:
getColumns in interface TableDefinition

getColumn

public final ColumnDefinition getColumn(String columnName)
Description copied from interface: TableDefinition
Get a column in this type by its name

Specified by:
getColumn in interface TableDefinition

getColumn

public final ColumnDefinition getColumn(String columnName,
                                        boolean ignoreCase)
Description copied from interface: TableDefinition
Get a column in this type by its name

Specified by:
getColumn in interface TableDefinition

getElements0

protected List<ColumnDefinition> getElements0()
                                       throws SQLException
Specified by:
getElements0 in class AbstractElementContainerDefinition<ColumnDefinition>
Throws:
SQLException

getColumn

public final ColumnDefinition getColumn(int columnIndex)
Description copied from interface: TableDefinition
Get a column in this type by its index (starting at 0)

Specified by:
getColumn in interface TableDefinition


Copyright © 2012. All Rights Reserved.