public abstract static class AbstractStoreQuery.AbstractExecutor extends Object implements StoreQuery.Executor
Executor that implements most methods as no-ops.| Constructor and Description |
|---|
AbstractExecutor() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
ClassMetaData[] |
getAccessPathMetaDatas(StoreQuery q)
Return an array of all persistent classes used in this query, or
empty array if unknown.
|
String |
getAlias(StoreQuery q)
If this is not a projection but the candidate results are placed
into a result class with an alias, return that alias.
|
boolean[] |
getAscending(StoreQuery q)
Return the ordering direction for all ordering clauses, or empty
array if none.
|
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.
|
int |
getOperation(StoreQuery q)
Returns the operation this executor is meant to execute.
|
OrderedMap<Object,Class<?>> |
getOrderedParameterTypes(StoreQuery q)
Return a map of parameter names to types.
|
Object |
getOrderingValue(StoreQuery q,
Object[] params,
Object resultObject,
int orderIndex)
Extract the value of the
orderIndexth ordering
expression in Query#getOrderingClauses from the
given result object. |
LinkedMap |
getParameterTypes(StoreQuery q)
Return a map of parameter names to types.
|
String[] |
getProjectionAliases(StoreQuery q)
Return the alias for each projection element, or empty array
if not a projection.
|
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.
|
void |
getRange(StoreQuery q,
Object[] params,
StoreQuery.Range range)
Mutate the given range to set any range information stored in
the query string and/or parameters.
|
Class<?> |
getResultClass(StoreQuery q)
Returns the result class, if any.
|
ResultShape<?> |
getResultShape(StoreQuery q) |
Map<FieldMetaData,Value> |
getUpdates(StoreQuery q)
Return a map of
FieldMetaData to update
Constants, in cases where this query is for a bulk update. |
boolean |
hasGrouping(StoreQuery q)
Whether the compiled query has grouping.
|
boolean |
isAggregate(StoreQuery q)
Return true if the compiled query is an aggregate.
|
boolean |
isDistinct(StoreQuery q) |
boolean |
isPacking(StoreQuery q)
Return true if this executor packs projections into the result
class itself.
|
void |
validate(StoreQuery q)
Validate components of query.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteQuery, toParameterArraypublic Number executeDelete(StoreQuery q, Object[] params)
StoreQuery.ExecutorexecuteDelete in interface StoreQuery.Executorpublic Number executeUpdate(StoreQuery q, Object[] params)
StoreQuery.ExecutorexecuteUpdate in interface StoreQuery.Executorpublic String[] getDataStoreActions(StoreQuery q, Object[] params, StoreQuery.Range range)
StoreQuery.ExecutorgetDataStoreActions in interface StoreQuery.Executorpublic void validate(StoreQuery q)
StoreQuery.Executorvalidate in interface StoreQuery.Executorpublic QueryExpressions[] getQueryExpressions()
StoreQuery.ExecutorgetQueryExpressions in interface StoreQuery.Executorpublic ResultShape<?> getResultShape(StoreQuery q)
getResultShape in interface StoreQuery.Executorpublic void getRange(StoreQuery q, Object[] params, StoreQuery.Range range)
StoreQuery.ExecutorgetRange in interface StoreQuery.Executorpublic Object getOrderingValue(StoreQuery q, Object[] params, Object resultObject, int orderIndex)
StoreQuery.ExecutororderIndexth 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.getOrderingValue in interface StoreQuery.ExecutorStoreQuery.supportsAbstractExecutors()public boolean[] getAscending(StoreQuery q)
StoreQuery.ExecutorgetAscending in interface StoreQuery.Executorpublic boolean isPacking(StoreQuery q)
StoreQuery.ExecutorisPacking in interface StoreQuery.Executorpublic String getAlias(StoreQuery q)
StoreQuery.ExecutorgetAlias in interface StoreQuery.Executorpublic String[] getProjectionAliases(StoreQuery q)
StoreQuery.ExecutorgetProjectionAliases in interface StoreQuery.Executorpublic Class<?>[] getProjectionTypes(StoreQuery q)
StoreQuery.ExecutorgetProjectionTypes in interface StoreQuery.Executorpublic ClassMetaData[] getAccessPathMetaDatas(StoreQuery q)
StoreQuery.ExecutorgetAccessPathMetaDatas in interface StoreQuery.Executorpublic int getOperation(StoreQuery q)
StoreQuery.ExecutorgetOperation in interface StoreQuery.ExecutorQueryOperationspublic boolean isAggregate(StoreQuery q)
StoreQuery.ExecutorisAggregate in interface StoreQuery.Executorpublic boolean isDistinct(StoreQuery q)
isDistinct in interface StoreQuery.Executorpublic boolean hasGrouping(StoreQuery q)
StoreQuery.ExecutorhasGrouping in interface StoreQuery.Executorpublic OrderedMap<Object,Class<?>> getOrderedParameterTypes(StoreQuery q)
StoreQuery.ExecutorMap.entrySet()'s Iterator must return values in the
order in which they were declared or used.getOrderedParameterTypes in interface StoreQuery.Executorpublic LinkedMap getParameterTypes(StoreQuery q)
StoreQuery.ExecutorMap.entrySet()'s Iterator must return values in the
order in which they were declared or used.getParameterTypes in interface StoreQuery.Executorpublic Class<?> getResultClass(StoreQuery q)
StoreQuery.ExecutorgetResultClass in interface StoreQuery.Executorpublic Map<FieldMetaData,Value> getUpdates(StoreQuery q)
StoreQuery.ExecutorFieldMetaData to update
Constants, in cases where this query is for a bulk update.getUpdates in interface StoreQuery.ExecutorCopyright © 2006–2022 Apache Software Foundation. All rights reserved.