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.StringPROP_CASE_INSENSITIVE_SEARCHstatic java.lang.StringPROP_COLUMN_DEFINITIONstatic java.lang.StringPROP_COLUMN_NAMEstatic java.lang.StringPROP_COLUMN_VALIDstatic java.lang.StringPROP_DEFAULT_VALUEstatic java.lang.StringPROP_HIDE_IN_NEW_ROW_DIALOGThis property if set to true will hide the field from the New Row Dialogstatic java.lang.StringPROP_JDBC_TYPEstatic java.lang.StringPROP_LENGTHstatic java.lang.StringPROP_ORACLETEXTINDEXstatic java.lang.StringPROP_REQUIREDstatic java.lang.StringPROP_SCALE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)booleancanDrop()Can column be dropped?java.lang.StringcolumnDefinition()The full column definition e.g VARCHAR2(255) or NUMBER(10.1).java.lang.StringgetColumnName()Get the name of the column.com.im.commons.db.ddl.DBDatabaseInfo.ColumnSQLTypegetColumnType()One of the ColumnType enum values.java.lang.StringgetDefaultValue()Getter for property defaultValue.DFFieldgetField()Get the field the column belongs to.intgetJdbcType()Get the jdbc type of the column, as defined inTypes.intgetLength()Get the length of the column.java.lang.StringgetNativeType()Native database column type (e.g.com.im.commons.db.ddl.DBDatabaseInfo.ResizingSupportedgetResizingSupported()Can the column be resized and rescaled.intgetScale()Get the scale of the column.voidhandleUpdateColInfo(com.im.commons.db.ddl.DBColInfo old, com.im.commons.db.ddl.DBColInfo nue)booleanisColumnInitialized()Gets the initialization status.booleanisColumnValid()Gets the status of the underlying database column.java.lang.BooleanisOracleTextIndex()booleanisRequired()NULL (false) or NOT NULL (true).voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)voidsetColumnName(java.lang.String columnName, com.im.commons.progress.DFEnvironmentRW env)Set the new name of the column.voidsetLength(int length, com.im.commons.progress.DFEnvironmentRW env)Set the length of the column.voidsetScale(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:
trueif the underlying database column exists and can be used,falseotherwise.- Since:
- 6.0
-
isColumnInitialized
boolean isColumnInitialized()
Gets the initialization status.- Returns:
trueif thisDBColumninstance has been properly initialized,falseotherwise.
-
-