org.jooq.util
Class DefaultColumnDefinition

java.lang.Object
  extended by org.jooq.util.AbstractDefinition
      extended by org.jooq.util.DefaultColumnDefinition
All Implemented Interfaces:
ColumnDefinition, Definition, TypedElementDefinition<TableDefinition>

public class DefaultColumnDefinition
extends AbstractDefinition
implements ColumnDefinition

A base implementation for column definitions.

Author:
Lukas Eder

Constructor Summary
DefaultColumnDefinition(TableDefinition table, String name, int position, DataTypeDefinition type, boolean nullable, boolean isIdentity, String comment)
           
DefaultColumnDefinition(TableDefinition table, String name, int position, DataTypeDefinition type, boolean isIdentity, String comment)
          Deprecated. - 2.1.0 - Use the other constructor instead
 
Method Summary
 T getContainer()
          The container that contains this typed element
 List<Definition> getDefinitionPath()
           
 ForeignKeyDefinition getForeignKey()
          A definition for the foreign key that this column is part of, or null if this column is not part of a foreign key.
 int getPosition()
          The column position in the table
 UniqueKeyDefinition getPrimaryKey()
          A definition for the primary key that this column is part of, or null if this column is not part of a primary key.
 DataTypeDefinition getType()
          The column / parameter type
 List<UniqueKeyDefinition> getUniqueKeys()
          All definitions of unique keys that this column is part of.
 boolean isIdentity()
          Whether this column is the table's IDENTITY column.
 boolean isNullable()
          Whether the column is nullable
 
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.TypedElementDefinition
getContainer
 
Methods inherited from interface org.jooq.util.Definition
getComment, getDatabase, getDefinitionPath, getInputName, getName, getOutputName, getOverload, getQualifiedInputName, getQualifiedName, getQualifiedOutputName, getSchema
 

Constructor Detail

DefaultColumnDefinition

@Deprecated
public DefaultColumnDefinition(TableDefinition table,
                                          String name,
                                          int position,
                                          DataTypeDefinition type,
                                          boolean isIdentity,
                                          String comment)
Deprecated. - 2.1.0 - Use the other constructor instead


DefaultColumnDefinition

public DefaultColumnDefinition(TableDefinition table,
                               String name,
                               int position,
                               DataTypeDefinition type,
                               boolean nullable,
                               boolean isIdentity,
                               String comment)
Method Detail

getPosition

public final int getPosition()
Description copied from interface: ColumnDefinition
The column position in the table

Specified by:
getPosition in interface ColumnDefinition

getType

public final DataTypeDefinition getType()
Description copied from interface: TypedElementDefinition
The column / parameter type

Specified by:
getType in interface TypedElementDefinition<TableDefinition>

getPrimaryKey

public final UniqueKeyDefinition getPrimaryKey()
Description copied from interface: ColumnDefinition
A definition for the primary key that this column is part of, or null if this column is not part of a primary key.

Specified by:
getPrimaryKey in interface ColumnDefinition

getUniqueKeys

public List<UniqueKeyDefinition> getUniqueKeys()
Description copied from interface: ColumnDefinition
All definitions of unique keys that this column is part of.

Specified by:
getUniqueKeys in interface ColumnDefinition

getForeignKey

public final ForeignKeyDefinition getForeignKey()
Description copied from interface: ColumnDefinition
A definition for the foreign key that this column is part of, or null if this column is not part of a foreign key.

Specified by:
getForeignKey in interface ColumnDefinition

isIdentity

public final boolean isIdentity()
Description copied from interface: ColumnDefinition
Whether this column is the table's IDENTITY column.

Specified by:
isIdentity in interface ColumnDefinition

isNullable

public final boolean isNullable()
Description copied from interface: ColumnDefinition
Whether the column is nullable

Specified by:
isNullable in interface ColumnDefinition

getContainer

public final T getContainer()
Description copied from interface: TypedElementDefinition
The container that contains this typed element

Specified by:
getContainer in interface TypedElementDefinition<T extends Definition>

getDefinitionPath

public List<Definition> getDefinitionPath()
Specified by:
getDefinitionPath in interface Definition
Returns:
A path of definitions for this definition, e.g. [schema].[package].[routine].[parameter]


Copyright © 2012. All Rights Reserved.