com.ibm.tspaces.query
Class AndQuery

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

public class AndQuery
extends java.lang.Object
implements Query

Class AndQuery Used to combine two queries This class extends the generic Query interface. An AndQuery object is specified at the client and passed to the server in a template tuple. At the server, it is transformed to a TSAndQuery object that is actually used for the query operation.

Example:

     MachQuery mq = new MatchQuery(template);
     IndexQuery iq = new IndexQuery("index1","key");
     ts.take(new AndQuery(iq,mq));
 

Author:
John Thomas
See Also:
Query, Serialized Form

Constructor Summary
AndQuery(Query lhs_, Query rhs_)
          Create a new AndQuery
 
Method Summary
 Query getLhs()
          access the lefthand side of an And query
 Query getRhs()
          access the righthand side of an And query
 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

AndQuery

public AndQuery(Query lhs_,
                Query rhs_)
Create a new AndQuery
Parameters:
lhs_ - The left-hand query
rhs_ - The right-hand query
Method Detail

getLhs

public Query getLhs()
access the lefthand side of an And query

getRhs

public Query getRhs()
access the righthand side of an And query

toString

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