com.ibm.tspaces.query
Class Range
java.lang.Object
|
+--com.ibm.tspaces.query.Range
- public class Range
- extends java.lang.Object
- implements java.io.Serializable
Used to specify the upper and lower bounds for a range query.
In the first version, ranges will be non-inclusive. A null
lower bound will specify a less-than query, likewise a null
upper bound will specify greater-than.
It will often be used as an operand of an IndexQuery.
Example usage:
String value1 = "any old data";
Integer key1 = new Interger(8);
ts.write(new Field("index1",key1),new Field(value1);
...
Range range = new Range(null,new Integer(9));
Field f1 = new Field(new IndexQuery("index1",range));
Tuple template = new Tuple(f1);
ts.take(template);
- Author:
- John Thomas
- See Also:
IndexQuery, Serialized Form
|
Constructor Summary |
Range(java.lang.Object lowerBound_,
java.lang.Object upperBound_)
Create a new Range |
|
Method Summary |
java.lang.Object |
getLower()
access the lower bound of the range |
java.lang.Object |
getUpper()
access the Upper bound of the range |
java.lang.String |
toString()
Display the Query |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Range
public Range(java.lang.Object lowerBound_,
java.lang.Object upperBound_)
- Create a new Range
- Parameters:
lowerBound_ - The lower bound for the search (possibly null).upperBound_ - The upper bound for the search (possibly null).
getLower
public java.lang.Object getLower()
- access the lower bound of the range
getUpper
public java.lang.Object getUpper()
- access the Upper bound of the range
toString
public java.lang.String toString()
- Display the Query
- Overrides:
- toString in class java.lang.Object