org.apache.geode.cache.operations

## Class QueryOperationContext

- java.lang.Object
- - org.apache.geode.cache.operations.OperationContext
  - - org.apache.geode.cache.operations.QueryOperationContext

- Direct Known Subclasses:
    ExecuteCQOperationContext

  Deprecated.
  since Geode1.0, use `ResourcePermission` instead

      public class QueryOperationContext
      extends OperationContext

  Encapsulates a cache query operation for both the pre-operation and post-operation cases.
  Since:
    GemFire 5.5

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.geode.cache.operations.OperationContext

      `OperationContext.OperationCode`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryOperationContext(java.lang.String queryString, java.util.Set regionNames, boolean postOperation)` Deprecated. Constructor for the query operation.
    `QueryOperationContext(java.lang.String queryString, java.util.Set regionNames, boolean postOperation, java.lang.Object[] queryParams)` Deprecated. Constructor for the query operation.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `OperationContext.OperationCode` | `getOperationCode()` Deprecated. Return the operation associated with the `OperationContext` object.
    `java.lang.String` | `getQuery()` Deprecated. Return the query string of this query operation.
    `java.lang.Object[]` | `getQueryParams()` Deprecated. Get the bind parameters for the query
    `java.lang.Object` | `getQueryResult()` Deprecated. Get the result of the query execution.
    `java.util.Set` | `getRegionNames()` Deprecated. Get the names of regions that are part of the query string.
    `boolean` | `isPostOperation()` Deprecated. True if the context is for post-operation.
    `void` | `modifyQuery(java.lang.String query)` Deprecated. Modify the query string.
    `void` | `setPostOperation()` Deprecated. Set the post-operation flag to true.
    `void` | `setQueryResult(java.lang.Object queryResult)` Deprecated. Set the result of query operation.
    `void` | `setRegionNames(java.util.Set regionNames)` Deprecated. Set the names of regions that are part of the query string.

    - ### Methods inherited from class org.apache.geode.cache.operations.OperationContext

      `isClientUpdate, isClientUpdate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QueryOperationContext

          public QueryOperationContext(java.lang.String queryString,
                                       java.util.Set regionNames,
                                       boolean postOperation)

      Deprecated.
      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

    - #### QueryOperationContext

          public QueryOperationContext(java.lang.String queryString,
                                       java.util.Set regionNames,
                                       boolean postOperation,
                                       java.lang.Object[] queryParams)

      Deprecated.
      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
        `queryParams` - the bind parameters for the query

  - ### Method Detail

    - #### getOperationCode

          public OperationContext.OperationCode getOperationCode()

      Deprecated.
      Return the operation associated with the `OperationContext` object.
      Specified by:
        `getOperationCode` in class `OperationContext`
      Returns:
        the `OperationCode` of this operation

    - #### isPostOperation

          public boolean isPostOperation()

      Deprecated.
      True if the context is for post-operation.
      Specified by:
        `isPostOperation` in class `OperationContext`

    - #### setPostOperation

          public void setPostOperation()

      Deprecated.
      Set the post-operation flag to true.

    - #### getQuery

          public java.lang.String getQuery()

      Deprecated.
      Return the query string of this query operation.

    - #### modifyQuery

          public void modifyQuery(java.lang.String query)

      Deprecated.
      Modify the query string.
      Parameters:
        `query` - the new query string for this query.

    - #### getRegionNames

          public java.util.Set getRegionNames()

      Deprecated.
      Get the names of regions that are part of the query string.
      Returns:
        names of regions being queried.

    - #### setRegionNames

          public void setRegionNames(java.util.Set regionNames)

      Deprecated.
      Set the names of regions that are part of the query string.
      Parameters:
        `regionNames` - names of regions being queried

    - #### getQueryResult

          public java.lang.Object getQueryResult()

      Deprecated.
      Get the result of the query execution.
      Returns:
        result of the query.

    - #### setQueryResult

          public void setQueryResult(java.lang.Object queryResult)

      Deprecated.
      Set the result of query operation.
      Parameters:
        `queryResult` - the new result of the query operation.

    - #### getQueryParams

          public java.lang.Object[] getQueryParams()

      Deprecated.
      Get the bind parameters for the query
      Returns:
        bind parameters for the query