Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.db
Interface Column

All Superinterfaces:
DatabaseObject

public interface Column
extends DatabaseObject

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.


Nested Class Summary
static class Column.IsPartOfPrimaryKey
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.db.DatabaseObject
DatabaseObject.DefaultComparator, DatabaseObject.IdentifierTransformer, DatabaseObject.NameTransformer
 
Field Summary
static org.eclipse.jpt.common.utility.predicate.Predicate<Column> IS_PART_OF_PRIMARY_KEY
           
 
Fields inherited from interface org.eclipse.jpt.jpa.db.DatabaseObject
DEFAULT_COMPARATOR, IDENTIFIER_TRANSFORMER, NAME_TRANSFORMER
 
Method Summary
 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.
 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 or a TimeDataType; 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.
 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 isDateDataType()
          Return whether the column's type is a date type.
 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 its table's foreign keys.
 boolean isPartOfPrimaryKey()
          Return whether the column is part of its table's primary key.
 boolean isPartOfUniqueConstraint()
          Return whether the column is part of a unique constraint defined for its table.
 boolean isTimeDataType()
          Return whether the column's type is time type.
 
Methods inherited from interface org.eclipse.jpt.jpa.db.DatabaseObject
getConnectionProfile, getDatabase, getIdentifier, getIdentifier, getName, refresh
 

Field Detail

IS_PART_OF_PRIMARY_KEY

static final org.eclipse.jpt.common.utility.predicate.Predicate<Column> IS_PART_OF_PRIMARY_KEY
Method Detail

getTable

Table getTable()
Return the column's table.


isPartOfPrimaryKey

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


isPartOfForeignKey

boolean isPartOfForeignKey()
Return whether the column is part of one of its 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

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


isNumeric

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


isDateDataType

boolean isDateDataType()
Return whether the column's type is a date type. (i.e. DATE, CALENDAR)


isTimeDataType

boolean isTimeDataType()
Return whether the column's type is time type. (i.e. TIME, TIMESTAMP)


getPrecision

int getPrecision()
Return the column's precision if it is a NumericalDataType or a TimeDataType; 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

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

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.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.