com.tivoli.twg.engine
Class TWGDbStringColumnFilter

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGDbColumnFilter
      extended bycom.tivoli.twg.engine.TWGDbStringColumnFilter
All Implemented Interfaces:
java.io.Serializable

public class TWGDbStringColumnFilter
extends TWGDbColumnFilter
implements java.io.Serializable

TWGDbStringColumnFilter encapsulates the parameters used to filter rows in a database table based on the values of a column that contains values of types Character and Character Varying. It is used for both queries and dynamic groups.

See Also:
Serialized Form

Constructor Summary
protected TWGDbStringColumnFilter(byte[] buf, int offset, java.lang.String version)
          This method is protected as an implementation side effect.
  TWGDbStringColumnFilter(java.lang.String columnFullName, java.lang.String operation)
          Constructor for the TWGDbDoubleColumnFilter class.
  TWGDbStringColumnFilter(java.lang.String tableName, java.lang.String columnName, java.lang.String operation)
          Constructor for the TWGDbFloatColumnFilter class.
  TWGDbStringColumnFilter(java.lang.String columnFullName, java.lang.String operation, java.lang.String[] column_values)
          Constructor for the TWGDbStringColumnFilter class.
  TWGDbStringColumnFilter(java.lang.String tableName, java.lang.String columnName, java.lang.String operation, java.lang.String[] column_values)
          Constructor for the TWGDbStringColumnFilter class.
  TWGDbStringColumnFilter(TWGDbStringColumnFilter copyColFilter)
          Create a TWGDbStringColumnFilter by copying another one
 
Method Summary
 void addColumnValue(java.lang.String column_value)
          Add a value to the filter for the column.
protected  TWGDbColumnFilter createFilterInfo(java.util.Locale loc)
          This method should be called only from within the Director engine.
 int getDataValueType()
          Get the type of data in this column filter.
 java.lang.String getDisplayValueAt(int column_index)
          This method should be used only after the column filter object has been sent through the IPC in response to a command that requests descriptive information about query parameters.
 java.lang.String[] getDisplayValues()
          This method should be used only after the column filter object has been sent through the IPC in response to a command that requests descriptive information about query parameters.
protected  int getIntelByteBufferSize()
          This method is protected as an implementation side effect.
 java.lang.String getValueAt(int column_index)
          Get the value at given index.
 java.lang.String[] getValues()
          Get copy of value array.
 java.util.Vector getValuesAsObject()
          Get the column values as Objects.
 int getValueSize()
          Get the number of values in this column filter
 int setIntelByteBufferParms(byte[] buf, int offset)
          This method is public as an implementation side effect.
 java.lang.String toString()
          Convert column filter to String for debug
 
Methods inherited from class com.tivoli.twg.engine.TWGDbColumnFilter
allowsGTLT, checkOperator, create, getColumnDisplayName, getColumnFullName, getColumnName, getColumnType, getOperator, getTableDisplayName, getTableName, setFilterInfo, setOperator, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TWGDbStringColumnFilter

public TWGDbStringColumnFilter(java.lang.String columnFullName,
                               java.lang.String operation)
                        throws TWGDbException
Constructor for the TWGDbDoubleColumnFilter class.

Parameters:
columnFullName - - table token name plus column token name. Format is "tableName.columnName".
operation - - operator for the filter. Valid values are: TWGDbColumnOperators.EQUAL NOT_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL LESS_THAN LESS_THAN_OR_EQUAL
Throws:
TWGDbException
See Also:
TWGDbColumnOperators

TWGDbStringColumnFilter

public TWGDbStringColumnFilter(java.lang.String tableName,
                               java.lang.String columnName,
                               java.lang.String operation)
                        throws TWGDbException
Constructor for the TWGDbFloatColumnFilter class.

Parameters:
columnName - - the token column name.
tableName - - the token table name.
operation - - operator for the filter. Valid values are: TWGDbColumnOperators.EQUAL NOT_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL LESS_THAN LESS_THAN_OR_EQUAL
Throws:
TWGDbException
See Also:
TWGDbColumnOperators

TWGDbStringColumnFilter

public TWGDbStringColumnFilter(java.lang.String columnFullName,
                               java.lang.String operation,
                               java.lang.String[] column_values)
                        throws TWGDbException
Constructor for the TWGDbStringColumnFilter class.

Parameters:
columnFullName - - table token name plus column token name. Format is "tableName.columnName".
operation - - operator for the filter. Valid values are: TWGDbColumnOperators.EQUAL NOT_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL LESS_THAN LESS_THAN_OR_EQUAL
column_values - - an integer array of values
Throws:
TWGDbException
See Also:
TWGDbColumnOperators

TWGDbStringColumnFilter

public TWGDbStringColumnFilter(java.lang.String tableName,
                               java.lang.String columnName,
                               java.lang.String operation,
                               java.lang.String[] column_values)
                        throws TWGDbException
Constructor for the TWGDbStringColumnFilter class.

Parameters:
columnName - - the token column name.
tableName - - the token table name.
operation - - operator for the filter. Valid values are: TWGDbColumnOperators.EQUAL NOT_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL LESS_THAN LESS_THAN_OR_EQUAL
column_values - - an integer array of values
Throws:
TWGDbException
See Also:
TWGDbColumnOperators

TWGDbStringColumnFilter

public TWGDbStringColumnFilter(TWGDbStringColumnFilter copyColFilter)
Create a TWGDbStringColumnFilter by copying another one

Parameters:
copyColFilter - -- the column filter to be copied

TWGDbStringColumnFilter

protected TWGDbStringColumnFilter(byte[] buf,
                                  int offset,
                                  java.lang.String version)
                           throws TWGDbException
This method is protected as an implementation side effect. Do not call or change. Its interface may be changed in a later release.

Constructor to create a column filter from an intel byte buffer format byte array

Parameters:
buf - - the byte array
offset - - the offset in the buffer that the column filter starts at
version - - the database version
Throws:
- - TWGDbException thrown for version errors
- - TWGDbParameterException thrown for parameter errors
TWGDbException
Method Detail

createFilterInfo

protected TWGDbColumnFilter createFilterInfo(java.util.Locale loc)
                                      throws TWGDbException
This method should be called only from within the Director engine. Create a filter info version of this column filter. Display values are initialized.

Specified by:
createFilterInfo in class TWGDbColumnFilter
Parameters:
loc - - the locale to be used for translations.
Throws:
TWGDbException

addColumnValue

public void addColumnValue(java.lang.String column_value)
                    throws TWGDbException
Add a value to the filter for the column.

Parameters:
column_value - - the value to be added
Throws:
TWGDbException

getValueSize

public int getValueSize()
Get the number of values in this column filter

Specified by:
getValueSize in class TWGDbColumnFilter
Returns:
the number of values

getValueAt

public java.lang.String getValueAt(int column_index)
Get the value at given index. The index starts from 0.

Parameters:
column_index - - the index
Returns:
the value.

getValues

public java.lang.String[] getValues()
Get copy of value array.

Returns:
the array of values

getDisplayValues

public java.lang.String[] getDisplayValues()
This method should be used only after the column filter object has been sent through the IPC in response to a command that requests descriptive information about query parameters.

Get the display values. These values may be the actual column values, or, for mapped columns they may be mapped to values from a resource bundle.

Returns:
the display values

getDisplayValueAt

public java.lang.String getDisplayValueAt(int column_index)
This method should be used only after the column filter object has been sent through the IPC in response to a command that requests descriptive information about query parameters. Method to the display value at given index. The index starts from 0.

Parameters:
column_index - - the index
Returns:
String containing the value.

getValuesAsObject

public java.util.Vector getValuesAsObject()
Get the column values as Objects.

Specified by:
getValuesAsObject in class TWGDbColumnFilter
Returns:
a vector of the values as objects.

getDataValueType

public int getDataValueType()
Get the type of data in this column filter. Types are defined in the class com.tivoli.twg.libs.DataValue

Specified by:
getDataValueType in class TWGDbColumnFilter
Returns:
the data type
See Also:
DataValue

setIntelByteBufferParms

public int setIntelByteBufferParms(byte[] buf,
                                   int offset)
                            throws TWGDbException
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release.

Write an intel byte buffer version of this column filter to a byte array at the offset specified.

Overrides:
setIntelByteBufferParms in class TWGDbColumnFilter
Parameters:
buf - - byte array in which to write the data
offset - - offset into the array to start writing
Throws:
- - TWGDbException thrown for parameter or version errors
TWGDbException

getIntelByteBufferSize

protected int getIntelByteBufferSize()
This method is protected as an implementation side effect. Do not call or change. Its interface may be changed in a later release. Determines the IntelByteBuffer size for this column filter

Overrides:
getIntelByteBufferSize in class TWGDbColumnFilter
Returns:
- size of buffer needed

toString

public java.lang.String toString()
Convert column filter to String for debug

Overrides:
toString in class TWGDbColumnFilter
Returns:
String with a textual description of the column filter.