Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

public Class GenericQualifier

extends Object
implements Qualifier
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.store.access.Qualifier
Imports
org.apache.derby.iapi.sql.Activation, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.Qualifier, org.apache.derby.iapi.types.DataValueDescriptor, org.apache.derby.iapi.services.loader.GeneratedMethod, org.apache.derby.shared.common.sanity.SanityManager

This is the implementation for Qualifier. It is used for generated scans.

Field Summary

Modifier and TypeField and Description
private Activation
private int
private boolean
private int
private DataValueDescriptor
private GeneratedMethod
private boolean
private boolean
protected int

Constructor Summary

AccessConstructor and Description
public
GenericQualifier(int columnId, int operator, GeneratedMethod orderableGetter, Activation activation, boolean orderedNulls, boolean unknownRV, boolean negateCompareResult, int variantType)

Method Summary

Modifier and TypeMethod and Description
public void
clearOrderableCache()

Implements org.apache.derby.iapi.store.access.Qualifier.clearOrderableCache.

Clear the DataValueDescriptor cache, if one exists.

public int
getColumnId()

Implements org.apache.derby.iapi.store.access.Qualifier.getColumnId.

Get the (zero based) id of the column to be qualified.

public int
getOperator()

Implements org.apache.derby.iapi.store.access.Qualifier.getOperator.

Get the operator to use in the comparison.

public DataValueDescriptor
getOrderable()

Implements org.apache.derby.iapi.store.access.Qualifier.getOrderable.

Get the value that the column is to be compared to.

public boolean
getOrderedNulls()

Implements org.apache.derby.iapi.store.access.Qualifier.getOrderedNulls.

Get the getOrderedNulls argument to use in the comparison.

public boolean
getUnknownRV()

Implements org.apache.derby.iapi.store.access.Qualifier.getUnknownRV.

Get the getOrderedNulls argument to use in the comparison.

public boolean
negateCompareResult()

Implements org.apache.derby.iapi.store.access.Qualifier.negateCompareResult.

Should the result from the compare operation be negated?

public void
reinitialize()

Implements org.apache.derby.iapi.store.access.Qualifier.reinitialize.

This method reinitializes all the state of the Qualifier.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

activationback to summary
private Activation activation
columnIdback to summary
private int columnId
negateCompareResultback to summary
private boolean negateCompareResult
operatorback to summary
private int operator
orderableCacheback to summary
private DataValueDescriptor orderableCache
orderableGetterback to summary
private GeneratedMethod orderableGetter
orderedNullsback to summary
private boolean orderedNulls
unknownRVback to summary
private boolean unknownRV
variantTypeback to summary
protected int variantType

Constructor Detail

GenericQualifierback to summary
public GenericQualifier(int columnId, int operator, GeneratedMethod orderableGetter, Activation activation, boolean orderedNulls, boolean unknownRV, boolean negateCompareResult, int variantType)

Method Detail

clearOrderableCacheback to summary
public void clearOrderableCache()

Implements org.apache.derby.iapi.store.access.Qualifier.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

See Also
Qualifier#getUnknownRV
getColumnIdback to summary
public int getColumnId()

Implements org.apache.derby.iapi.store.access.Qualifier.getColumnId.

Doc from org.apache.derby.iapi.store.access.Qualifier.getColumnId.

Get 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.

See Also
Qualifier#getColumnId
getOperatorback to summary
public int getOperator()

Implements org.apache.derby.iapi.store.access.Qualifier.getOperator.

Get the operator to use in the comparison.

See Also
Qualifier#getOperator
getOrderableback to summary
public DataValueDescriptor getOrderable() throws StandardException

Implements org.apache.derby.iapi.store.access.Qualifier.getOrderable.

Doc from org.apache.derby.iapi.store.access.Qualifier.getOrderable.

Get the value that the column is to be compared to.

Exceptions
StandardException:
Thrown on error
See Also
Qualifier#getOrderable
getOrderedNullsback to summary
public boolean getOrderedNulls()

Implements org.apache.derby.iapi.store.access.Qualifier.getOrderedNulls.

Get the getOrderedNulls argument to use in the comparison.

See Also
Qualifier#getOrderedNulls
getUnknownRVback to summary
public boolean getUnknownRV()

Implements org.apache.derby.iapi.store.access.Qualifier.getUnknownRV.

Get the getOrderedNulls argument to use in the comparison.

See Also
Qualifier#getUnknownRV
negateCompareResultback to summary
public boolean negateCompareResult()

Implements org.apache.derby.iapi.store.access.Qualifier.negateCompareResult.

Should the result from the compare operation be negated? If true then only rows which fail the compare operation will qualify.

See Also
Qualifier#negateCompareResult
reinitializeback to summary
public void reinitialize()

Implements org.apache.derby.iapi.store.access.Qualifier.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.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object