org.apache.openjpa.slice.jdbc
Class DistributedStoreQuery.ParallelExecutor

java.lang.Object
  extended by org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
      extended by org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
          extended by org.apache.openjpa.kernel.ExpressionStoreQuery.DataStoreExecutor
              extended by org.apache.openjpa.slice.jdbc.DistributedStoreQuery.ParallelExecutor
All Implemented Interfaces:
Serializable, StoreQuery.Executor
Enclosing class:
DistributedStoreQuery

public static class DistributedStoreQuery.ParallelExecutor
extends ExpressionStoreQuery.DataStoreExecutor

Executes queries on multiple databases.

Author:
Pinaki Poddar
See Also:
Serialized Form

Constructor Summary
DistributedStoreQuery.ParallelExecutor(DistributedStoreQuery dsq, ClassMetaData meta, boolean subclasses, ExpressionParser parser, Object parsed, boolean parallel)
           
 
Method Summary
 void addExecutor(StoreQuery.Executor ex)
           
(package private)  boolean containsReplicated(QueryContext query)
          Scans metadata to find out if a replicated class is the candidate.
 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)
          Each child query must be executed with slice context and not the given query context.
 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.
(package private)  List<SliceStoreManager> findTargets()
           
 
Methods inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery.DataStoreExecutor
getDataStoreActions, getOrderingValue, getProjectionTypes, getQueryExpressions
 
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

DistributedStoreQuery.ParallelExecutor

public DistributedStoreQuery.ParallelExecutor(DistributedStoreQuery dsq,
                                              ClassMetaData meta,
                                              boolean subclasses,
                                              ExpressionParser parser,
                                              Object parsed,
                                              boolean parallel)
Method Detail

addExecutor

public void addExecutor(StoreQuery.Executor ex)

executeQuery

public ResultObjectProvider executeQuery(StoreQuery q,
                                         Object[] params,
                                         StoreQuery.Range range)
Each child query must be executed with slice context and not the given query context.

Specified by:
executeQuery in interface StoreQuery.Executor
Overrides:
executeQuery in class ExpressionStoreQuery.DataStoreExecutor
See Also:
StoreQuery.Executor.isPacking(org.apache.openjpa.kernel.StoreQuery)

containsReplicated

boolean containsReplicated(QueryContext query)
Scans metadata to find out if a replicated class is the candidate.


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 ExpressionStoreQuery.DataStoreExecutor

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 ExpressionStoreQuery.DataStoreExecutor

findTargets

List<SliceStoreManager> findTargets()


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