dbXML API

com.dbxml.db.core.indexer
Class IndexQuery

java.lang.Object
  extended bycom.dbxml.db.core.indexer.IndexQuery
Direct Known Subclasses:
IndexQueryANY, IndexQueryBW, IndexQueryBWX, IndexQueryEQ, IndexQueryGEQ, IndexQueryGT, IndexQueryIN, IndexQueryLEQ, IndexQueryLT, IndexQueryNBW, IndexQueryNBWX, IndexQueryNEQ, IndexQueryNIN, IndexQueryNSW, IndexQuerySW

public class IndexQuery
extends java.lang.Object

IndexQuery represents the most primitive form of index querying. Instances of this object should be created by QueryResolvers and cached in Query instances.


Field Summary
static int ANY
          Any And All Matches
static int BW
          Between (Inclusive)
static int BWX
          Between (Exclusive)
static int EQ
          Equal To
static int GT
          Greater Than
static int GTE
          Greater Than Or Equal To
static int IN
          In The Set
static int LT
          Less Than
static int LTE
          Less Than Or Equal To
static int NBW
          Not Between (Inclusive)
static int NBWX
          Not Between (Exclusive)
static int NEQ
          Not Equal To
static int NIN
          Not In The Set
static int NSW
          Not Starts-with
static int SW
          Starts-with
 
Constructor Summary
IndexQuery(IndexPattern pattern)
           
IndexQuery(IndexPattern pattern, int op, Value val1)
           
IndexQuery(IndexPattern pattern, int op, Value[] vals)
           
IndexQuery(IndexPattern pattern, int op, Value val1, Value val2)
           
IndexQuery(IndexPattern pattern, Value val1)
           
IndexQuery(IndexPattern pattern, Value[] vals)
           
IndexQuery(IndexPattern pattern, Value val1, Value val2)
           
 
Method Summary
 int getLength()
          getLength returns the length of the Value set associated with this query.
 int getOperator()
          getOperator returns the operator associated with this query.
 IndexPattern getPattern()
          getPattern returns the IndexPattern associated with this query.
 Value getValue(int index)
          getValue returns one of the Values associated with this query.
 Value[] getValues()
          getValues returns the Values associated with this query.
 boolean testValue(Value v)
          testValue tests the specified value for validity against this IndexQuery.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final int ANY
Any And All Matches

See Also:
Constant Field Values

EQ

public static final int EQ
Equal To

See Also:
Constant Field Values

NEQ

public static final int NEQ
Not Equal To

See Also:
Constant Field Values

GT

public static final int GT
Greater Than

See Also:
Constant Field Values

LTE

public static final int LTE
Less Than Or Equal To

See Also:
Constant Field Values

LT

public static final int LT
Less Than

See Also:
Constant Field Values

GTE

public static final int GTE
Greater Than Or Equal To

See Also:
Constant Field Values

BW

public static final int BW
Between (Inclusive)

See Also:
Constant Field Values

NBW

public static final int NBW
Not Between (Inclusive)

See Also:
Constant Field Values

BWX

public static final int BWX
Between (Exclusive)

See Also:
Constant Field Values

NBWX

public static final int NBWX
Not Between (Exclusive)

See Also:
Constant Field Values

IN

public static final int IN
In The Set

See Also:
Constant Field Values

NIN

public static final int NIN
Not In The Set

See Also:
Constant Field Values

SW

public static final int SW
Starts-with

See Also:
Constant Field Values

NSW

public static final int NSW
Not Starts-with

See Also:
Constant Field Values
Constructor Detail

IndexQuery

public IndexQuery(IndexPattern pattern)

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  Value[] vals)

IndexQuery

public IndexQuery(IndexPattern pattern,
                  Value[] vals)

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  Value val1)

IndexQuery

public IndexQuery(IndexPattern pattern,
                  Value val1)

IndexQuery

public IndexQuery(IndexPattern pattern,
                  int op,
                  Value val1,
                  Value val2)

IndexQuery

public IndexQuery(IndexPattern pattern,
                  Value val1,
                  Value val2)
Method Detail

getPattern

public IndexPattern getPattern()
getPattern returns the IndexPattern associated with this query.

Returns:
the IndexPattern

getOperator

public int getOperator()
getOperator returns the operator associated with this query.

Returns:
The operator

getValue

public final Value getValue(int index)
getValue returns one of the Values associated with this query.

Parameters:
index - The Value index
Returns:
The request Value

getValues

public Value[] getValues()
getValues returns the Values associated with this query.

Returns:
The Value set

getLength

public final int getLength()
getLength returns the length of the Value set associated with this query.

Returns:
The Value set length

testValue

public boolean testValue(Value v)
testValue tests the specified value for validity against this IndexQuery. The helper classes in com.dbxml.db.core.indexer.helpers should be used for optimized performance.

Returns:
Whether or not the value matches

dbXML API

Copyright (c) 2004 The dbXML Group