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

java.lang.Object
  extended by org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
      extended by org.apache.openjpa.jdbc.kernel.SQLStoreQuery.SQLExecutor
          extended by org.apache.openjpa.slice.jdbc.DistributedSQLStoreQuery.ParallelExecutor
All Implemented Interfaces:
StoreQuery.Executor
Enclosing class:
DistributedSQLStoreQuery

public static class DistributedSQLStoreQuery.ParallelExecutor
extends SQLStoreQuery.SQLExecutor

Executes queries on multiple databases.

Author:
Pinaki Poddar

Constructor Summary
DistributedSQLStoreQuery.ParallelExecutor(DistributedSQLStoreQuery dsq, ClassMetaData meta, boolean p)
           
 
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.jdbc.kernel.SQLStoreQuery.SQLExecutor
executeQuery, executeUpdate, getDataStoreActions, getOperation, isPacking, prepareCall, prepareCall, prepareStatement, prepareStatement, toParameterArray
 
Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
getAccessPathMetaDatas, getAlias, getAscending, getOrderedParameterTypes, getOrderingValue, getParameterTypes, getProjectionAliases, getProjectionTypes, getQueryExpressions, getRange, getResultClass, getResultShape, getUpdates, hasGrouping, isAggregate, isDistinct, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedSQLStoreQuery.ParallelExecutor

public DistributedSQLStoreQuery.ParallelExecutor(DistributedSQLStoreQuery dsq,
                                                 ClassMetaData meta,
                                                 boolean p)
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 SQLStoreQuery.SQLExecutor
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 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 SQLStoreQuery.SQLExecutor

findTargets

List<SliceStoreManager> findTargets()


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