org.eobjects.metamodel.schema
Interface Column

All Superinterfaces:
Comparable<Column>, HasName, NamedStructure, Serializable
All Known Implementing Classes:
AbstractColumn, ImmutableColumn, MutableColumn

public interface Column
extends Comparable<Column>, Serializable, NamedStructure

Represents a column and it's metadata description. Columns reside within a Table and can be used as keys for relationships between tables.

Author:
Kasper Sørensen
See Also:
Table

Method Summary
 int getColumnNumber()
          Returns the column number or index.
 Integer getColumnSize()
          Gets the data type size of this column.
 String getName()
          Gets the name of this Column
 String getNativeType()
          Gets the native type of this column.
 String getRemarks()
          Gets any remarks/comments to this column.
 Table getTable()
          Gets the table for which this column belong
 ColumnType getType()
          Gets the type of the column
 boolean isIndexed()
          Determines if this column is indexed.
 Boolean isNullable()
          Determines whether or not this column accepts null values.
 boolean isPrimaryKey()
          Determines if this column is (one of) the primary key(s) of its table.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.eobjects.metamodel.schema.NamedStructure
getQualifiedLabel, getQuote, getQuotedName
 

Method Detail

getName

String getName()
Gets the name of this Column

Specified by:
getName in interface HasName
Specified by:
getName in interface NamedStructure
Returns:
the name of this Column

getColumnNumber

int getColumnNumber()
Returns the column number or index. Note: This column number is 0-based whereas the JDBC is 1-based.

Returns:
the number of this column.

getType

ColumnType getType()
Gets the type of the column

Returns:
this column's type.

getTable

Table getTable()
Gets the table for which this column belong

Returns:
this column's table.

isNullable

Boolean isNullable()
Determines whether or not this column accepts null values.

Returns:
true if this column accepts null values, false if not and null if not known.

getRemarks

String getRemarks()
Gets any remarks/comments to this column.

Returns:
any remarks/comments to this column.

getColumnSize

Integer getColumnSize()
Gets the data type size of this column.

Returns:
the data type size of this column or null if the size is not determined or known.

getNativeType

String getNativeType()
Gets the native type of this column. A native type is the name of the data type as defined in the datastore.

Returns:
the name of the native type.

isIndexed

boolean isIndexed()
Determines if this column is indexed.

Returns:
true if this column is indexed or false if not (or not known)

isPrimaryKey

boolean isPrimaryKey()
Determines if this column is (one of) the primary key(s) of its table.

Returns:
true if this column is a primary key, or false if not (or if this is not determinable).


Copyright © 2007-2013. All Rights Reserved.