Package 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
Fields Modifier and Type Field Description static java.lang.String
PROP_CASE_INSENSITIVE_SEARCH
static java.lang.String
PROP_COLUMN_DEFINITION
static java.lang.String
PROP_COLUMN_NAME
static java.lang.String
PROP_COLUMN_VALID
static java.lang.String
PROP_DEFAULT_VALUE
static java.lang.String
PROP_HIDE_IN_NEW_ROW_DIALOG
This property if set to true will hide the field from the New Row Dialogstatic java.lang.String
PROP_JDBC_TYPE
static java.lang.String
PROP_LENGTH
static java.lang.String
PROP_ORACLETEXTINDEX
static java.lang.String
PROP_REQUIRED
static java.lang.String
PROP_SCALE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
boolean
canDrop()
Can column be dropped?java.lang.String
columnDefinition()
The full column definition e.g VARCHAR2(255) or NUMBER(10.1).java.lang.String
getColumnName()
Get the name of the column.com.im.commons.db.ddl.DBDatabaseInfo.ColumnSQLType
getColumnType()
One of the ColumnType enum values.java.lang.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 inTypes
.int
getLength()
Get the length of the column.java.lang.String
getNativeType()
Native database column type (e.g.com.im.commons.db.ddl.DBDatabaseInfo.ResizingSupported
getResizingSupported()
Can the column be resized and rescaled.int
getScale()
Get the scale of the column.void
handleUpdateColInfo(com.im.commons.db.ddl.DBColInfo old, com.im.commons.db.ddl.DBColInfo nue)
boolean
isColumnInitialized()
Gets the initialization status.boolean
isColumnValid()
Gets the status of the underlying database column.java.lang.Boolean
isOracleTextIndex()
boolean
isRequired()
NULL (false) or NOT NULL (true).void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
void
setColumnName(java.lang.String columnName, com.im.commons.progress.DFEnvironmentRW env)
Set the new name of the column.void
setLength(int length, com.im.commons.progress.DFEnvironmentRW env)
Set the length of the column.void
setScale(int scale, com.im.commons.progress.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 java.lang.String PROP_COLUMN_NAME
- See Also:
- Constant Field Values
-
PROP_SCALE
static final java.lang.String PROP_SCALE
- See Also:
- Constant Field Values
-
PROP_LENGTH
static final java.lang.String PROP_LENGTH
- See Also:
- Constant Field Values
-
PROP_REQUIRED
static final java.lang.String PROP_REQUIRED
- See Also:
- Constant Field Values
-
PROP_ORACLETEXTINDEX
static final java.lang.String PROP_ORACLETEXTINDEX
- See Also:
- Constant Field Values
-
PROP_DEFAULT_VALUE
static final java.lang.String PROP_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
PROP_CASE_INSENSITIVE_SEARCH
static final java.lang.String PROP_CASE_INSENSITIVE_SEARCH
- See Also:
- Constant Field Values
-
PROP_HIDE_IN_NEW_ROW_DIALOG
static final java.lang.String PROP_HIDE_IN_NEW_ROW_DIALOG
This property if set to true will hide the field from the New Row Dialog- Since:
- 6.3
- See Also:
- Constant Field Values
-
PROP_JDBC_TYPE
static final java.lang.String PROP_JDBC_TYPE
- See Also:
- Constant Field Values
-
PROP_COLUMN_DEFINITION
static final java.lang.String PROP_COLUMN_DEFINITION
- See Also:
- Constant Field Values
-
PROP_COLUMN_VALID
static final java.lang.String PROP_COLUMN_VALID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getColumnName
java.lang.String getColumnName()
Get the name of the column.- Returns:
- Value of property columnName.
-
setColumnName
void setColumnName(java.lang.String columnName, com.im.commons.progress.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, com.im.commons.progress.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, com.im.commons.progress.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.
-
isOracleTextIndex
java.lang.Boolean isOracleTextIndex()
- Returns:
- true if OracleText index for this column is present.
-
getDefaultValue
java.lang.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 inTypes
.- Returns:
- Value of property jdbcType.
-
getNativeType
java.lang.String getNativeType()
Native database column type (e.g. VARCHAR2, NUMBER)- Returns:
- The column type
-
getColumnType
com.im.commons.db.ddl.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
java.lang.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
com.im.commons.db.ddl.DBDatabaseInfo.ResizingSupported getResizingSupported()
Can the column be resized and rescaled.- Returns:
- One of the values of the ResizingSupported enum.
-
addPropertyChangeListener
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
-
removePropertyChangeListener
void removePropertyChangeListener(java.beans.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(com.im.commons.db.ddl.DBColInfo old, com.im.commons.db.ddl.DBColInfo nue)
-
isColumnValid
boolean isColumnValid()
Gets the status of the underlying database column.- Returns:
true
if the underlying database column exists and can be used,false
otherwise.- Since:
- 6.0
-
isColumnInitialized
boolean isColumnInitialized()
Gets the initialization status.- Returns:
true
if thisDBColumn
instance has been properly initialized,false
otherwise.
-
-