org.apache.derby.impl.store.access.conglomerate
Class QualifierUtil

java.lang.Object
  extended byorg.apache.derby.impl.store.access.conglomerate.QualifierUtil
All Implemented Interfaces:
Qualifier

public class QualifierUtil
extends java.lang.Object
implements Qualifier


Field Summary
private  int column_id
           
private  DataValueDescriptor key_val
           
private  boolean negateCompareResult
           
private  int operator
           
private  boolean orderedNulls
           
private  boolean unknownRV
           
 
Fields inherited from interface org.apache.derby.iapi.store.access.Qualifier
CONSTANT, QUERY_INVARIANT, SCAN_INVARIANT, VARIANT
 
Constructor Summary
QualifierUtil(int column_id, DataValueDescriptor key_val, int operator, boolean negateCompareResult, boolean orderedNulls, boolean unknownRV)
          Constuctor
 
Method Summary
 void clearOrderableCache()
          Clear the DataValueDescriptor cache, if one exists.
 int getColumnId()
          Get the id of the column to be qualified.
 int getOperator()
          Get the operator to use in the comparison.
 DataValueDescriptor getOrderable()
          Get the value that the column is to be compared to.
 boolean getOrderedNulls()
          Get the getOrderedNulls argument to use in the comparison.
 boolean getUnknownRV()
          Get the getOrderedNulls argument to use in the comparison.
 boolean negateCompareResult()
          Should the result of the compare be negated?
 void reinitialize()
          This method reinitializes all the state of the Qualifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

column_id

private int column_id

key_val

private DataValueDescriptor key_val

operator

private int operator

negateCompareResult

private boolean negateCompareResult

orderedNulls

private boolean orderedNulls

unknownRV

private boolean unknownRV
Constructor Detail

QualifierUtil

public QualifierUtil(int column_id,
                     DataValueDescriptor key_val,
                     int operator,
                     boolean negateCompareResult,
                     boolean orderedNulls,
                     boolean unknownRV)
Constuctor

Method Detail

getColumnId

public int getColumnId()
Get the id of the column to be qualified.

Specified by:
getColumnId in interface Qualifier

getOrderable

public DataValueDescriptor getOrderable()
Get the value that the column is to be compared to.

Specified by:
getOrderable in interface Qualifier

getOperator

public int getOperator()
Get the operator to use in the comparison.

Specified by:
getOperator in interface Qualifier
See Also:
DataValueDescriptor.compare(org.apache.derby.iapi.types.DataValueDescriptor)

negateCompareResult

public boolean negateCompareResult()
Should the result of the compare be negated?

Specified by:
negateCompareResult in interface Qualifier
See Also:
DataValueDescriptor.compare(org.apache.derby.iapi.types.DataValueDescriptor)

getOrderedNulls

public boolean getOrderedNulls()
Get the getOrderedNulls argument to use in the comparison.

Specified by:
getOrderedNulls in interface Qualifier
See Also:
DataValueDescriptor.compare(org.apache.derby.iapi.types.DataValueDescriptor)

getUnknownRV

public boolean getUnknownRV()
Get the getOrderedNulls argument to use in the comparison.

Specified by:
getUnknownRV in interface Qualifier
See Also:
DataValueDescriptor.compare(org.apache.derby.iapi.types.DataValueDescriptor)

clearOrderableCache

public void clearOrderableCache()
Clear the DataValueDescriptor cache, if one exists. (The DataValueDescriptor can be 1 of 3 types: o VARIANT - cannot be cached as its value can vary within a scan o SCAN_INVARIANT - can be cached within a scan as its value will not change within a scan o QUERY_INVARIANT- can be cached across the life of the query as its value will never change o CONSTANT - can be cached across executions

Specified by:
clearOrderableCache in interface Qualifier
See Also:
Qualifier.getUnknownRV()

reinitialize

public void reinitialize()
This method reinitializes all the state of the Qualifier. It is used to distinguish between resetting something that is query invariant and something that is constant over every execution of a query. Basically, clearOrderableCache() will only clear out its cache if it is a VARIANT or SCAN_INVARIANT value. However, each time a query is executed, the QUERY_INVARIANT qualifiers need to be reset.

Specified by:
reinitialize in interface Qualifier

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.