com.tivoli.twg.engine
Class TWGDbDoubleColumnFilter

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

public class TWGDbDoubleColumnFilter
extends TWGDbColumnFilter
implements java.io.Serializable

TWGDbDoubleColumnFilter encapsulates the parameters used to filter rows in a database table based on the values of a column that contains values of type double. It is used for both queries and dynamic groups.

See Also:
Serialized Form

Constructor Summary
protected TWGDbDoubleColumnFilter(byte[] buf, int offset, java.lang.String version)
          This method is protected as an implementation side effect.
  TWGDbDoubleColumnFilter(java.lang.String columnFullName, java.lang.String operation)
          Constructor for the TWGDbDoubleColumnFilter class.
  TWGDbDoubleColumnFilter(java.lang.String columnFullName, java.lang.String operation, double[] column_values)
          Constructor for the TWGDbDoubleColumnFilter class.
  TWGDbDoubleColumnFilter(java.lang.String tableName, java.lang.String columnName, java.lang.String operation)
          Constructor for the TWGDbDoubleColumnFilter class.
  TWGDbDoubleColumnFilter(java.lang.String tableName, java.lang.String columnName, java.lang.String operation, double[] column_values)
          Constructor for the TWGDbDoubleColumnFilter class.
  TWGDbDoubleColumnFilter(TWGDbDoubleColumnFilter copyColFilter)
          Create a TWGDbDoubleColumnFilter by copying another one
 
Method Summary
 void addColumnValue(double 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.
protected  int getIntelByteBufferSize()
          This method is protected as an implementation side effect.
 double getValueAt(int column_index)
          Get the value at given index.
 double[] getValues()
          Get a copy of value array.
 java.util.Vector getValuesAsObject()
          Get the column values as Objects.
 int getValueSize()
          Get the number of values
 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

TWGDbDoubleColumnFilter

public TWGDbDoubleColumnFilter(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

TWGDbDoubleColumnFilter

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

Parameters:
tableName - - table token name
columnName - - column token 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

TWGDbDoubleColumnFilter

public TWGDbDoubleColumnFilter(java.lang.String columnFullName,
                               java.lang.String operation,
                               double[] column_values)
                        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
column_values - - a double array of values
Throws:
TWGDbException
See Also:
TWGDbColumnOperators

TWGDbDoubleColumnFilter

public TWGDbDoubleColumnFilter(java.lang.String tableName,
                               java.lang.String columnName,
                               java.lang.String operation,
                               double[] column_values)
                        throws TWGDbException
Constructor for the TWGDbDoubleColumnFilter 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 double array of values
Throws:
TWGDbException

TWGDbDoubleColumnFilter

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

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

TWGDbDoubleColumnFilter

protected TWGDbDoubleColumnFilter(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 names are initialized.

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

addColumnValue

public void addColumnValue(double 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

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

getValueAt

public double 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 double[] getValues()
Get a copy of value array.

Returns:
the array of values

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.