Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.kernel
Class ExpressionStoreQuery.DataStoreExecutor

    java.lang.Object
      org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
          org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
              org.apache.openjpa.kernel.ExpressionStoreQuery.DataStoreExecutor

All Implemented Interfaces:
  Serializable, StoreQuery.Executor

Direct Known Subclasses:
  DistributedStoreQuery.ParallelExecutor

Enclosing class:
  ExpressionStoreQuery

    public static class ExpressionStoreQuery.DataStoreExecutor

extends ExpressionStoreQuery.AbstractExpressionExecutor
implements StoreQuery.Executor, Serializable

The DataStoreExecutor executes the query against the implementation's overridden `executeQuery(org.apache.openjpa.kernel.StoreQuery, java.lang.Object[], org.apache.openjpa.kernel.StoreQuery.Range)` method.

Author:
  Marc Prud'hommeaux
See Also:
  Serialized Form

Constructor Summary
`ExpressionStoreQuery.DataStoreExecutor(ExpressionStoreQuery q, ClassMetaData meta, boolean subclasses, ExpressionParser parser, Object parsed)`

Method Summary
`Number` | `executeDelete(StoreQuery q, Object[] params)` Deleted the objects that result from the execution of the query, retuning the number of objects that were deleted.
`ResultObjectProvider` | `executeQuery(StoreQuery q, Object[] params, StoreQuery.Range range)` Return the result of executing this query with the given parameter values.
`Number` | `executeUpdate(StoreQuery q, Object[] params)` Updates the objects that result from the execution of the query, retuning the number of objects that were updated.
`String[]` | `getDataStoreActions(StoreQuery q, Object[] params, StoreQuery.Range range)` Return a description of the commands that will be sent to the datastore in order to execute the query.
`Object` | `getOrderingValue(StoreQuery q, Object[] params, Object resultObject, int orderIndex)` Extract the value of the `orderIndex`th ordering expression in `Query#getOrderingClauses` from the given result object.
`Class[]` | `getProjectionTypes(StoreQuery q)` Return the expected types of the projections used by this query, or an empty array if not a projection.
`QueryExpressions[]` | `getQueryExpressions()` Return the parsed query expressions for our candidate types.

Methods inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
`assertNotContainer, getAccessPathMetaDatas, getAlias, getAscending, getOperation, getOrderedParameterTypes, getProjectionAliases, getRange, getResultClass, getResultShape, getUpdates, hasGrouping, isAggregate, isDistinct, isPacking, toParameterArray, validate`

Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
`getParameterTypes`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.openjpa.kernel.StoreQuery.Executor
`getAccessPathMetaDatas, getAlias, getAscending, getOperation, getOrderedParameterTypes, getParameterTypes, getProjectionAliases, getRange, getResultClass, getResultShape, getUpdates, hasGrouping, isAggregate, isDistinct, isPacking, toParameterArray, validate`

Constructor Detail

### ExpressionStoreQuery.DataStoreExecutor

    public ExpressionStoreQuery.DataStoreExecutor(ExpressionStoreQuery q,
                                                  ClassMetaData meta,
                                                  boolean subclasses,
                                                  ExpressionParser parser,
                                                  Object parsed)

Method Detail

### getQueryExpressions

    public QueryExpressions[] getQueryExpressions()

  Description copied from interface: `StoreQuery.Executor`
  Return the parsed query expressions for our candidate types. The expressions are available only after query has been parsed.

  Specified by:
    `getQueryExpressions` in interface `StoreQuery.Executor`
  Overrides:
    `getQueryExpressions` in class `AbstractStoreQuery.AbstractExecutor`

### executeQuery

    public ResultObjectProvider executeQuery(StoreQuery q,
                                             Object[] params,
                                             StoreQuery.Range range)

  Description copied from interface: `StoreQuery.Executor`
  Return the result of executing this query with the given parameter values. If this query is a projection and this executor does not pack results itself, each element of the returned result object provider should be an object array containing the projection values.

  Specified by:
    `executeQuery` in interface `StoreQuery.Executor`
  See Also:
    `StoreQuery.Executor.isPacking(org.apache.openjpa.kernel.StoreQuery)`

### executeDelete

    public Number executeDelete(StoreQuery q,
                                Object[] params)

  Description copied from interface: `StoreQuery.Executor`
  Deleted the objects that result from the execution of the query, retuning the number of objects that were deleted.

  Specified by:
    `executeDelete` in interface `StoreQuery.Executor`
  Overrides:
    `executeDelete` in class `AbstractStoreQuery.AbstractExecutor`

### executeUpdate

    public Number executeUpdate(StoreQuery q,
                                Object[] params)

  Description copied from interface: `StoreQuery.Executor`
  Updates the objects that result from the execution of the query, retuning the number of objects that were updated.

  Specified by:
    `executeUpdate` in interface `StoreQuery.Executor`
  Overrides:
    `executeUpdate` in class `AbstractStoreQuery.AbstractExecutor`

### getDataStoreActions

    public String[] getDataStoreActions(StoreQuery q,
                                        Object[] params,
                                        StoreQuery.Range range)

  Description copied from interface: `StoreQuery.Executor`
  Return a description of the commands that will be sent to the datastore in order to execute the query.

  Specified by:
    `getDataStoreActions` in interface `StoreQuery.Executor`
  Overrides:
    `getDataStoreActions` in class `AbstractStoreQuery.AbstractExecutor`

### getOrderingValue

    public Object getOrderingValue(StoreQuery q,
                                   Object[] params,
                                   Object resultObject,
                                   int orderIndex)

  Description copied from interface: `StoreQuery.Executor`
  Extract the value of the `orderIndex`th ordering expression in `Query#getOrderingClauses` from the given result object. The result object will be an object from the result object provider returned from `StoreQuery.Executor.executeQuery(org.apache.openjpa.kernel.StoreQuery, java.lang.Object[], org.apache.openjpa.kernel.StoreQuery.Range)`. This method is used when several result lists have to be merged in memory. If this exeuctor's parent query supports executors on abstract or interface classes, this method will not be used.

  Specified by:
    `getOrderingValue` in interface `StoreQuery.Executor`
  Overrides:
    `getOrderingValue` in class `AbstractStoreQuery.AbstractExecutor`
  See Also:
    `StoreQuery.supportsAbstractExecutors()`

### getProjectionTypes

    public Class[] getProjectionTypes(StoreQuery q)

  Description copied from interface: `StoreQuery.Executor`
  Return the expected types of the projections used by this query, or an empty array if not a projection.

  Specified by:
    `getProjectionTypes` in interface `StoreQuery.Executor`
  Overrides:
    `getProjectionTypes` in class `ExpressionStoreQuery.AbstractExpressionExecutor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.