com.tivoli.twg.engine
Class TWGDbIntegerColumnFilter

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

public class TWGDbIntegerColumnFilter
extends TWGDbColumnFilter

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

See Also:
Serialized Form

Constructor Summary
protected TWGDbIntegerColumnFilter(byte[] buf, int offset, java.lang.String version)
          This method is protected as an implementation side effect.
  TWGDbIntegerColumnFilter(java.lang.String columnFullName, java.lang.String operation)
          Constructor for the TWGDbIntegerColumnFilter class.
  TWGDbIntegerColumnFilter(java.lang.String columnFullName, java.lang.String operation, int[] column_values)
          Constructor for the TWGDbIntegerColumnFilter class.
  TWGDbIntegerColumnFilter(java.lang.String tableName, java.lang.String columnName, java.lang.String operation)
          Constructor for the TWGDbIntegerColumnFilter class.
  TWGDbIntegerColumnFilter(java.lang.String tableName, java.lang.String columnName, java.lang.String operation, int[] column_values)
          Constructor for the TWGDbIntegerColumnFilter class.
  TWGDbIntegerColumnFilter(TWGDbIntegerColumnFilter copyColFilter)
          Create a TWGDbIntegerColumnFilter by copying another one
 
Method Summary
 void addColumnValue(int 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.
 int getValueAt(int column_index)
          Get the value at given index.
 int[] 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 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

TWGDbIntegerColumnFilter

public TWGDbIntegerColumnFilter(java.lang.String columnFullName,
                                java.lang.String operation)
                         throws TWGDbException
Constructor for the TWGDbIntegerColumnFilter 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

TWGDbIntegerColumnFilter

public TWGDbIntegerColumnFilter(java.lang.String tableName,
                                java.lang.String columnName,
                                java.lang.String operation)
                         throws TWGDbException
Constructor for the TWGDbIntegerColumnFilter 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

TWGDbIntegerColumnFilter

public TWGDbIntegerColumnFilter(java.lang.String columnFullName,
                                java.lang.String operation,
                                int[] column_values)
                         throws TWGDbException
Constructor for the TWGDbIntegerColumnFilter 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

TWGDbIntegerColumnFilter

public TWGDbIntegerColumnFilter(java.lang.String tableName,
                                java.lang.String columnName,
                                java.lang.String operation,
                                int[] column_values)
                         throws TWGDbException
Constructor for the TWGDbIntegerColumnFilter 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

TWGDbIntegerColumnFilter

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

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

TWGDbIntegerColumnFilter

protected TWGDbIntegerColumnFilter(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

addColumnValue

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

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

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

getValueSize

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

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

getValueAt

public int 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 int[] getValues()
Get 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:
Vector containing 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 to String for debug

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