Class GenericQualifier
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.GenericQualifier
-
-
Field Summary
Fields Modifier and Type Field Description private Activationactivationprivate intcolumnIdprivate booleannegateCompareResultprivate intoperatorprivate DataValueDescriptororderableCacheprivate GeneratedMethodorderableGetterprivate booleanorderedNullsprivate booleanunknownRVprotected intvariantType-
Fields inherited from interface org.apache.derby.iapi.store.access.Qualifier
CONSTANT, QUERY_INVARIANT, SCAN_INVARIANT, VARIANT
-
-
Constructor Summary
Constructors Constructor Description GenericQualifier(int columnId, int operator, GeneratedMethod orderableGetter, Activation activation, boolean orderedNulls, boolean unknownRV, boolean negateCompareResult, int variantType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearOrderableCache()Clear the DataValueDescriptor cache, if one exists.intgetColumnId()Get the (zero based) id of the column to be qualified.intgetOperator()Get the operator to use in the comparison.DataValueDescriptorgetOrderable()Get the value that the column is to be compared to.booleangetOrderedNulls()Get the getOrderedNulls argument to use in the comparison.booleangetUnknownRV()Get the getOrderedNulls argument to use in the comparison.booleannegateCompareResult()Should the result from the compare operation be negated?voidreinitialize()This method reinitializes all the state of the Qualifier.java.lang.StringtoString()
-
-
-
Field Detail
-
columnId
private int columnId
-
operator
private int operator
-
orderableGetter
private GeneratedMethod orderableGetter
-
activation
private Activation activation
-
orderedNulls
private boolean orderedNulls
-
unknownRV
private boolean unknownRV
-
negateCompareResult
private boolean negateCompareResult
-
variantType
protected int variantType
-
orderableCache
private DataValueDescriptor orderableCache
-
-
Constructor Detail
-
GenericQualifier
public GenericQualifier(int columnId, int operator, GeneratedMethod orderableGetter, Activation activation, boolean orderedNulls, boolean unknownRV, boolean negateCompareResult, int variantType)
-
-
Method Detail
-
getColumnId
public int getColumnId()
Description copied from interface:QualifierGet the (zero based) id of the column to be qualified.This id is the column number of the column in the table, no matter whether a partial column set is being retrieved by the actual fetch. Note that the column being specified in the qualifier must appear in the column list being fetched.
- Specified by:
getColumnIdin interfaceQualifier- See Also:
Qualifier.getColumnId()
-
getOrderable
public DataValueDescriptor getOrderable() throws StandardException
Description copied from interface:QualifierGet the value that the column is to be compared to.- Specified by:
getOrderablein interfaceQualifier- Throws:
StandardException- Thrown on error- See Also:
Qualifier.getOrderable()
-
getOperator
public int getOperator()
Get the operator to use in the comparison.- Specified by:
getOperatorin interfaceQualifier- See Also:
Qualifier.getOperator()
-
negateCompareResult
public boolean negateCompareResult()
Should the result from the compare operation be negated? If true then only rows which fail the compare operation will qualify.- Specified by:
negateCompareResultin interfaceQualifier- See Also:
Qualifier.negateCompareResult()
-
getOrderedNulls
public boolean getOrderedNulls()
Get the getOrderedNulls argument to use in the comparison.- Specified by:
getOrderedNullsin interfaceQualifier- See Also:
Qualifier.getOrderedNulls()
-
getUnknownRV
public boolean getUnknownRV()
Get the getOrderedNulls argument to use in the comparison.- Specified by:
getUnknownRVin interfaceQualifier- See Also:
Qualifier.getUnknownRV()
-
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 - never changes- Specified by:
clearOrderableCachein interfaceQualifier- 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:
reinitializein interfaceQualifier
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-