com.ibm.tspaces.query
Class IndexQuery

java.lang.Object
  |
  +--com.ibm.tspaces.query.IndexQuery

public class IndexQuery
extends java.lang.Object
implements Query

Class IndexQuery Use the T Tree index structure to answer the query. This class extends the generic Query interface. An IndexQuery object is specified at the client and passed to the server in a template tuple. At the server, it is transformed to a TSIndexQuery object that is actually used for the query operation.

Example usage:

     String value1 = "any old data";
     String key1 = "mykey";
     ts.write(new Field("index1",key1),new Field(value1);
   ...
     Field f1 = new Field(new IndexQuery("index1","mykey"));
     Tuple template = new Tuple(f1);
     ts.take(template);
 

Author:
John Thomas
See Also:
Query, Serialized Form

Constructor Summary
IndexQuery(java.lang.String indexName_, java.lang.Object searchValue_)
          Create a new IndexQuery object that will query the associated index for the specified value.
 
Method Summary
 java.lang.String getIndex()
          access the name of the index
 java.lang.Object getValue()
          access the search Value
 java.lang.String toString()
          Display the Query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexQuery

public IndexQuery(java.lang.String indexName_,
                  java.lang.Object searchValue_)
Create a new IndexQuery object that will query the associated index for the specified value.
Parameters:
indexName_ - The name of the index to search
searchValue_ - The value to search for (possibly a Range)
Method Detail

getIndex

public java.lang.String getIndex()
access the name of the index

getValue

public java.lang.Object getValue()
access the search Value

toString

public java.lang.String toString()
Display the Query
Overrides:
toString in class java.lang.Object