org.eclipse.datatools.sqltools.sql.reference
Interface IColumn


public interface IColumn

Author:
Li Huang The Column models a column of a table.

Method Summary
 java.lang.String getDefaultValue()
          Returns the default value or null if none.
 java.lang.String getName()
          Returns the column name.
 java.lang.String getOwnerTable()
          Return the owner table name.
 java.lang.String getRemarks()
          Returns the explanatory remarks set on the column or null if none
 int getScale()
          Return the scale of the column.
 ITable getTable()
          Return the owner table.
 java.lang.String getTypeName()
          Returns the string represenation of the columns dataType.
 java.lang.String getUserType()
          Return the user type.
 int getWidth()
          Returns the width of the column.
 boolean isForeignKey()
          Returns true if this IColumn is part of a foreign key constraint.
 boolean isNullable()
          Returns true if this IColumn is nullable.
 boolean isPrimaryKey()
          Returns true if this IColumn is part of a primary key constraint.
 boolean isUnique()
          Returns true if this IColumn is part of a unique constraint.
 void setTable(ITable table)
          Set the owner table.
 

Method Detail

getName

java.lang.String getName()
Returns the column name.

Returns:

getDefaultValue

java.lang.String getDefaultValue()
Returns the default value or null if none.

Returns:
String

getWidth

int getWidth()
Returns the width of the column. This depends on the data type.

Returns:
int

getScale

int getScale()
Return the scale of the column. The number of digits after the decimal point for numeric data type columns, and zero for all other data types. This despends on the data type.

Returns:
int

getTypeName

java.lang.String getTypeName()
Returns the string represenation of the columns dataType.

Returns:
String

isForeignKey

boolean isForeignKey()
Returns true if this IColumn is part of a foreign key constraint.

Returns:
boolean

isNullable

boolean isNullable()
Returns true if this IColumn is nullable.

Returns:
boolean

isPrimaryKey

boolean isPrimaryKey()
Returns true if this IColumn is part of a primary key constraint.

Returns:
boolean

isUnique

boolean isUnique()
Returns true if this IColumn is part of a unique constraint.

Returns:
boolean

getRemarks

java.lang.String getRemarks()
Returns the explanatory remarks set on the column or null if none

Returns:
String

getUserType

java.lang.String getUserType()
Return the user type. If the column is defined on a user-defined data type, the data type is held here.

Returns:
String

getOwnerTable

java.lang.String getOwnerTable()
Return the owner table name.

Returns:
String

getTable

ITable getTable()
Return the owner table.

Returns:
table

setTable

void setTable(ITable table)
Set the owner table.

Parameters:
table -