GemFire 6.5.1

com.gemstone.gemfire.cache.operations
Class QueryOperationContext

java.lang.Object
  extended by com.gemstone.gemfire.cache.operations.OperationContext
      extended by com.gemstone.gemfire.cache.operations.QueryOperationContext
Direct Known Subclasses:
ExecuteCQOperationContext

public class QueryOperationContext
extends OperationContext

Encapsulates a cache query operation for both the pre-operation and post-operation cases.

Since:
5.5

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gemstone.gemfire.cache.operations.OperationContext
OperationContext.OperationCode
 
Constructor Summary
QueryOperationContext(String queryString, Set regionNames, boolean postOperation)
          Constructor for the query operation.
 
Method Summary
 OperationContext.OperationCode getOperationCode()
          Return the operation associated with the OperationContext object.
 String getQuery()
          Return the query string of this query operation.
 Object getQueryResult()
          Get the result of the query execution.
 Set getRegionNames()
          Get the names of regions that are part of the query string.
 boolean isPostOperation()
          True if the context is for post-operation.
 void modifyQuery(String query)
          Modify the query string.
 void setPostOperation()
          Set the post-operation flag to true.
 void setQueryResult(Object queryResult)
          Set the result of query operation.
 void setRegionNames(Set regionNames)
          Set the names of regions that are part of the query string.
 
Methods inherited from class com.gemstone.gemfire.cache.operations.OperationContext
isClientUpdate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryOperationContext

public QueryOperationContext(String queryString,
                             Set regionNames,
                             boolean postOperation)
Constructor for the query operation.

Parameters:
queryString - the query string for this operation
regionNames - names of regions that are part of the query string
postOperation - true to set the post-operation flag
Method Detail

getOperationCode

public OperationContext.OperationCode getOperationCode()
Return the operation associated with the OperationContext object.

Specified by:
getOperationCode in class OperationContext
Returns:
the OperationCode of this operation

isPostOperation

public boolean isPostOperation()
True if the context is for post-operation.

Specified by:
isPostOperation in class OperationContext

setPostOperation

public void setPostOperation()
Set the post-operation flag to true.


getQuery

public String getQuery()
Return the query string of this query operation.


modifyQuery

public void modifyQuery(String query)
Modify the query string.

Parameters:
query - the new query string for this query.

getRegionNames

public Set getRegionNames()
Get the names of regions that are part of the query string.

Returns:
names of regions being queried.

setRegionNames

public void setRegionNames(Set regionNames)
Set the names of regions that are part of the query string.

Parameters:
regionNames - names of regions being queried

getQueryResult

public Object getQueryResult()
Get the result of the query execution.

Returns:
result of the query.

setQueryResult

public void setQueryResult(Object queryResult)
Set the result of query operation.

Parameters:
queryResult - the new result of the query operation.

GemFire 6.5.1

Copyright © 2002-2010 GemStone Systems, Inc. All Rights Reserved.