|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGDbColumn
com.tivoli.twg.engine.TWGDbCharColumn
TWGDbCharColumn is a container class that encapsulates a database table column where the column type is Character.
Field Summary | |
---|---|
protected TWGStringArray |
columnDisplayValues
|
protected StringValueSet |
columnDistinctValues
|
protected TWGStringArray |
columnValues
|
static java.lang.String |
NULL
Value substituted into query results to indicate the database value was null. |
Constructor Summary | |
---|---|
TWGDbCharColumn(java.lang.String realName,
java.lang.String tokenName,
int colLength)
Create a character column TWGDbCharColumn |
|
TWGDbCharColumn(TWGDbCharColumn copyCol)
Create a TWGDbCharColumn by copying another one |
Method Summary | |
---|---|
protected TWGDbColumn |
createFilterColumn(java.util.Locale loc,
TWGDatabaseTable table)
Create a TWGFilterCharColumn version of this column. |
java.lang.String[] |
getDisplayValues()
|
protected java.io.Serializable |
getDistinctValues(java.util.Locale loc,
TWGDatabaseTable table)
The method is only to be used on Director Engine Get values as an object which can be serialized and sent as an IPC output parm. |
java.lang.String[] |
getValues()
Gets the array of distinct values for this column. |
protected void |
insertDistinctValue(java.lang.Object value)
This method is protected as an implementation side effect. |
protected void |
replaceDistinctValues(java.sql.ResultSet rs)
This method is protected as an implementation side effect. |
protected void |
replaceDistinctValues(TWGStringArray newValues)
This method is protected as an implementation side effect. |
void |
setDefaultValue(java.lang.String defaultValue)
Set a default value for this column. |
protected void |
setDistinctValues(java.lang.Object vals)
Set distinct values (console use) |
void |
setDistinctValues(TWGStringArray values)
Set the distinct values for this column to a constant set. |
void |
setInitialDistinctValues(TWGString dv)
Set the initial distinct values for this column. |
void |
setInitialDistinctValues(TWGStringArray dv)
Set the initial distinct values for this column. |
void |
setMappedColumn(boolean mapped)
Set whether column is translated via resource bundles. |
void |
sortValues(java.util.Locale loc)
This method is protected as an implementation side effect. |
java.lang.String |
toString()
Convert column to String for debug |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected TWGStringArray columnValues
protected TWGStringArray columnDisplayValues
protected StringValueSet columnDistinctValues
public static final java.lang.String NULL
Constructor Detail |
public TWGDbCharColumn(java.lang.String realName, java.lang.String tokenName, int colLength)
realName
- -- the actual column name for the tabletokenName
- -- a nickname used to refer to the columncolLength
- -- the length for the columnpublic TWGDbCharColumn(TWGDbCharColumn copyCol)
copyCol
- -- the column to be copiedMethod Detail |
protected TWGDbColumn createFilterColumn(java.util.Locale loc, TWGDatabaseTable table)
createFilterColumn
in class TWGDbColumn
loc
- - the locale to use for translationstable
- - the TWGDatabaseTable that this column belongs to
public void setDefaultValue(java.lang.String defaultValue)
This method should be called only in the create method of a TWGDatabaseTable subclass when defining the table
defaultValue
- - the valuepublic void setMappedColumn(boolean mapped)
This method should be called only in the create method of a TWGDatabaseTable subclass when defining the table
setMappedColumn
in class TWGDbColumn
mapped
- - true if the column values are to be translated, otherwise false
/*public void sortValues(java.util.Locale loc)
Sort the column values.
loc
- - Localepublic java.lang.String[] getValues()
public java.lang.String[] getDisplayValues()
protected java.io.Serializable getDistinctValues(java.util.Locale loc, TWGDatabaseTable table)
getDistinctValues
in class TWGDbColumn
loc
- - Locale for displayable values.table
- - a TWGDatabaseTable instance. The column
is in the table.
protected void replaceDistinctValues(java.sql.ResultSet rs) throws TWGDbException
Replace the saved list of distinct values with a new set from a database query.
replaceDistinctValues
in class TWGDbColumn
rs
- - The query ResultSet.
-
- TWGDbException
TWGDbException
protected void replaceDistinctValues(TWGStringArray newValues)
Replace the saved list of distinct values with a new set
newValues
- - The StringValueSet containing the new valuesStringValueSet
protected void setDistinctValues(java.lang.Object vals)
setDistinctValues
in class TWGDbColumn
protected void insertDistinctValue(java.lang.Object value) throws TWGDbException
Insert a distinct value into the list of distinct values.
insertDistinctValue
in class TWGDbColumn
value
- - The value to be inserted as an object.
-
- TWGDbException
TWGDbException
public void setDistinctValues(TWGStringArray values)
This method should be called only in the create method of a TWGDatabaseTable subclass when defining the table
values
- - The TWGStringArray containing the constant distinct valuesStringValueSet
public void setInitialDistinctValues(TWGString dv)
dv
- - TWGString datavaluepublic void setInitialDistinctValues(TWGStringArray dv)
dv
- - TWGStringArray datavaluepublic java.lang.String toString()
toString
in class TWGDbColumn
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |