Class GenericScanQualifier

java.lang.Object
org.apache.derby.impl.sql.execute.GenericScanQualifier
All Implemented Interfaces:
ScanQualifier, Qualifier

public class GenericScanQualifier extends Object implements ScanQualifier
This is the implementation for ScanQualifier. It is used for system and user scans.
Version:
0.1
  • Field Details

    • columnId

      private int columnId
    • orderable

      private DataValueDescriptor orderable
    • operator

      private int operator
    • negateCR

      private boolean negateCR
    • orderedNulls

      private boolean orderedNulls
    • unknownRV

      private boolean unknownRV
    • properInit

      private boolean properInit
  • Constructor Details

    • GenericScanQualifier

      public GenericScanQualifier()
  • Method Details

    • getColumnId

      public int getColumnId()
      Description copied from interface: Qualifier
      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.

      Specified by:
      getColumnId in interface Qualifier
      See Also:
    • getOrderable

      public DataValueDescriptor getOrderable()
      Description copied from interface: Qualifier
      Get the value that the column is to be compared to.
      Specified by:
      getOrderable in interface Qualifier
      See Also:
    • getOperator

      public int getOperator()
      Get the operator to use in the comparison.
      Specified by:
      getOperator in interface Qualifier
      See Also:
    • 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:
      negateCompareResult in interface Qualifier
      See Also:
    • getOrderedNulls

      public boolean getOrderedNulls()
      Get the getOrderedNulls argument to use in the comparison.
      Specified by:
      getOrderedNulls in interface Qualifier
      See Also:
    • getUnknownRV

      public boolean getUnknownRV()
      Get the getOrderedNulls argument to use in the comparison.
      Specified by:
      getUnknownRV in interface Qualifier
      See Also:
    • 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 - immutable
      Specified by:
      clearOrderableCache in interface Qualifier
      See Also:
    • 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
    • setQualifier

      public void setQualifier(int columnId, DataValueDescriptor orderable, int operator, boolean negateCR, boolean orderedNulls, boolean unknownRV)
      Description copied from interface: ScanQualifier
      Set the info in a ScanQualifier
      Specified by:
      setQualifier in interface ScanQualifier
      See Also: