com.im.df.api 5.9

com.im.df.api.capabilities
Interface DBFieldCapability.DBColumn

All Superinterfaces:
PropertiesEditingConfigurable
Enclosing interface:
DBFieldCapability

public static interface DBFieldCapability.DBColumn
extends PropertiesEditingConfigurable

Represents a single database column. This object can be used for obtaining more information about DB columns as well as for changing them (renaming column, resizing, etc.). Use the main schema DDL lock for setters.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.im.df.api.support.PropertiesEditingConfigurable
PropertiesEditingConfigurable.Extra
 
Field Summary
static String PROP_CASE_INSENSITIVE_SEARCH
           
static String PROP_COLUMN_DEFINITION
           
static String PROP_COLUMN_NAME
           
static String PROP_DEFAULT_VALUE
           
static String PROP_JDBC_TYPE
           
static String PROP_LENGTH
           
static String PROP_REQUIRED
           
static String PROP_SCALE
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 boolean canDrop()
          Can column be dropped?
 String columnDefinition()
          The full column definition e.g VARCHAR2(255) or NUMBER(10.1).
 String getColumnName()
          Get the name of the column.
 DBDatabaseInfo.ColumnSQLType getColumnType()
          One of the ColumnType enum values.
 String getDefaultValue()
          Getter for property defaultValue.
 DFField getField()
          Get the field the column belongs to.
 int getJdbcType()
          Get the jdbc type of the column, as defined in Types.
 int getLength()
          Get the length of the column.
 String getNativeType()
          Native database column type (e.g.
 DBDatabaseInfo.ResizingSupported getResizingSupported()
          Can the column be resized and rescaled.
 int getScale()
          Get the scale of the column.
 void handleUpdateColInfo(DBColInfo old, DBColInfo nue)
           
 boolean isRequired()
          NULL (false) or NOT NULL (true).
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setColumnName(String columnName, DFEnvironmentRW env)
          Set the new name of the column.
 void setLength(int length, DFEnvironmentRW env)
          Set the length of the column.
 void setScale(int scale, DFEnvironmentRW env)
          Set the scale of the column.
 
Methods inherited from interface com.im.df.api.support.PropertiesEditingConfigurable
isPropertyEditable
 

Field Detail

PROP_COLUMN_NAME

static final String PROP_COLUMN_NAME
See Also:
Constant Field Values

PROP_SCALE

static final String PROP_SCALE
See Also:
Constant Field Values

PROP_LENGTH

static final String PROP_LENGTH
See Also:
Constant Field Values

PROP_REQUIRED

static final String PROP_REQUIRED
See Also:
Constant Field Values

PROP_DEFAULT_VALUE

static final String PROP_DEFAULT_VALUE
See Also:
Constant Field Values

PROP_CASE_INSENSITIVE_SEARCH

static final String PROP_CASE_INSENSITIVE_SEARCH
See Also:
Constant Field Values

PROP_JDBC_TYPE

static final String PROP_JDBC_TYPE
See Also:
Constant Field Values

PROP_COLUMN_DEFINITION

static final String PROP_COLUMN_DEFINITION
See Also:
Constant Field Values
Method Detail

getColumnName

String getColumnName()
Get the name of the column.

Returns:
Value of property columnName.

setColumnName

void setColumnName(String columnName,
                   DFEnvironmentRW env)
Set the new name of the column.

Parameters:
columnName - New value of property columnName.

getScale

int getScale()
Get the scale of the column. Only appropriate for some column types. Will have the value of zero where not appropriate

Returns:
Value of property scale.

setScale

void setScale(int scale,
              DFEnvironmentRW env)
Set the scale of the column. Only appropriate for some column types. Default is zero.

Parameters:
scale - New value of property scale.
env - The environment with feedback and proper lock

getLength

int getLength()
Get the length of the column. Only appropriate for some column types.

Returns:
Value of property length.

setLength

void setLength(int length,
               DFEnvironmentRW env)
Set the length of the column.

Parameters:
length - New value of property length.
env - The environment with feedback and proper lock

isRequired

boolean isRequired()
NULL (false) or NOT NULL (true).

Returns:
Value of property required.

getDefaultValue

String getDefaultValue()
Getter for property defaultValue. Can be null.

Returns:
Value of property defaultValue.

getJdbcType

int getJdbcType()
Get the jdbc type of the column, as defined in Types.

Returns:
Value of property jdbcType.

getNativeType

String getNativeType()
Native database column type (e.g. VARCHAR2, NUMBER)

Returns:
The column type

getColumnType

DBDatabaseInfo.ColumnSQLType getColumnType()
One of the ColumnType enum values. May not be defined if not understood by DIF.

Returns:
The the ColumnType enum value

columnDefinition

String columnDefinition()
The full column definition e.g VARCHAR2(255) or NUMBER(10.1).

TODO P2 - this method is going to be renamed to follow bean pattern style.


getField

DFField getField()
Get the field the column belongs to.

Returns:
Field that is owner of the column

getResizingSupported

DBDatabaseInfo.ResizingSupported getResizingSupported()
Can the column be resized and rescaled.

Returns:
One of the values of the ResizingSupported enum.

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)

canDrop

boolean canDrop()
Can column be dropped?

Returns:
true, if the DB column can be dropped. Some columns are fixed (e.g. JChem columns) and cannot be removed even though the field is deleted.

handleUpdateColInfo

void handleUpdateColInfo(DBColInfo old,
                         DBColInfo nue)

com.im.df.api 5.9