org.eclipse.jpt.db
Interface Column

All Superinterfaces:
java.lang.Comparable<Column>, DatabaseObject

public interface Column
extends DatabaseObject, java.lang.Comparable<Column>

Database column Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. This interface is not intended to be implemented by clients.


Method Summary
 java.lang.String getDataTypeName()
          Return the name of the column's datatype.
 JavaType getJavaType()
          Return a Java type that is reasonably similar to the column's data type.
 java.lang.String getJavaTypeDeclaration()
          Return a Java type declaration that is reasonably similar to the column's data type.
 int getLength()
          If the column is a CharacterStringDataType, return its length; otherwise, return -1.
 int getPrecision()
          Return the column's precision if it is a NumericalDataType; otherwise, return -1.
 JavaType getPrimaryKeyJavaType()
          Return a Java type that is reasonably similar to the column's data type and suitable for use as a primary key field.
 java.lang.String getPrimaryKeyJavaTypeDeclaration()
          Return a Java type declaration that is reasonably similar to the column's data type and suitable for use as a primary key field.
 int getScale()
          Return the column's scale if it is an ExactNumericDataType; otherwise, return -1.
 Table getTable()
          Return the column's table.
 boolean isLOB()
          Return whether the column's datatype is a LOB type (i.e.
 boolean isNullable()
          Return whether the column is nullable.
 boolean isNumeric()
          Return whether the column's type is numeric.
 boolean isPartOfForeignKey()
          Return whether the column is part of one of it's table's foreign keys.
 boolean isPartOfPrimaryKey()
          Return whether the column is part of it's table's primary key.
 boolean isPartOfUniqueConstraint()
          Return whether the column is part of a unique constraint defined for its table.
 
Methods inherited from interface org.eclipse.jpt.db.DatabaseObject
getConnectionProfile, getDatabase, getIdentifier, getIdentifier, getName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getTable

Table getTable()
Return the column's table.


isPartOfPrimaryKey

boolean isPartOfPrimaryKey()
Return whether the column is part of it's table's primary key.


isPartOfForeignKey

boolean isPartOfForeignKey()
Return whether the column is part of one of it's table's foreign keys.


isPartOfUniqueConstraint

boolean isPartOfUniqueConstraint()
Return whether the column is part of a unique constraint defined for its table.


isNullable

boolean isNullable()
Return whether the column is nullable.


getDataTypeName

java.lang.String getDataTypeName()
Return the name of the column's datatype.


isNumeric

boolean isNumeric()
Return whether the column's type is numeric.


getPrecision

int getPrecision()
Return the column's precision if it is a NumericalDataType; otherwise, return -1.


getScale

int getScale()
Return the column's scale if it is an ExactNumericDataType; otherwise, return -1.


getLength

int getLength()
If the column is a CharacterStringDataType, return its length; otherwise, return -1.


isLOB

boolean isLOB()
Return whether the column's datatype is a LOB type (i.e. BLOB, CLOB, or NCLOB).


getJavaTypeDeclaration

java.lang.String getJavaTypeDeclaration()
Return a Java type declaration that is reasonably similar to the column's data type.


getJavaType

JavaType getJavaType()
Return a Java type that is reasonably similar to the column's data type.


getPrimaryKeyJavaTypeDeclaration

java.lang.String getPrimaryKeyJavaTypeDeclaration()
Return a Java type declaration that is reasonably similar to the column's data type and suitable for use as a primary key field.


getPrimaryKeyJavaType

JavaType getPrimaryKeyJavaType()
Return a Java type that is reasonably similar to the column's data type and suitable for use as a primary key field.