GigaSpaces XAP 9.7.2 API

org.openspaces.jpa.openjpa
Class StoreManagerQuery

java.lang.Object
  extended by org.apache.openjpa.kernel.AbstractStoreQuery
      extended by org.apache.openjpa.kernel.ExpressionStoreQuery
          extended by org.openspaces.jpa.openjpa.StoreManagerQuery
All Implemented Interfaces:
Serializable, org.apache.openjpa.kernel.QueryOperations, org.apache.openjpa.kernel.StoreQuery

public class StoreManagerQuery
extends org.apache.openjpa.kernel.ExpressionStoreQuery

Executes select queries. update & delete SQL operations are performed in memory and executed on commit. The provided OpenJPA expression tree is translated to either GigaSpaces' SQLQuery or JDBC.

Since:
8.0
Author:
idan
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery
org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor, org.apache.openjpa.kernel.ExpressionStoreQuery.DataStoreExecutor
 
Nested classes/interfaces inherited from class org.apache.openjpa.kernel.AbstractStoreQuery
org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
 
Nested classes/interfaces inherited from interface org.apache.openjpa.kernel.StoreQuery
org.apache.openjpa.kernel.StoreQuery.Executor, org.apache.openjpa.kernel.StoreQuery.Range
 
Field Summary
 
Fields inherited from class org.apache.openjpa.kernel.AbstractStoreQuery
ctx
 
Fields inherited from interface org.apache.openjpa.kernel.StoreQuery
EMPTY_BOOLEANS, EMPTY_CLASSES, EMPTY_METAS, EMPTY_OBJECTS, EMPTY_ORDERED_PARAMS, EMPTY_PARAMS, EMPTY_STRINGS
 
Fields inherited from interface org.apache.openjpa.kernel.QueryOperations
OP_DELETE, OP_SELECT, OP_UPDATE
 
Constructor Summary
StoreManagerQuery(org.apache.openjpa.kernel.exps.ExpressionParser parser, StoreManager store)
           
 
Method Summary
protected  org.apache.openjpa.lib.rop.ResultObjectProvider executeQuery(org.apache.openjpa.kernel.StoreQuery.Executor ex, org.apache.openjpa.meta.ClassMetaData classMetaData, org.apache.openjpa.meta.ClassMetaData[] types, boolean subClasses, org.apache.openjpa.kernel.exps.ExpressionFactory[] factories, org.apache.openjpa.kernel.exps.QueryExpressions[] expressions, Object[] parameters, org.apache.openjpa.kernel.StoreQuery.Range range)
          Execute the given expression against the given candidate extent.
protected  String[] getDataStoreActions(org.apache.openjpa.meta.ClassMetaData base, org.apache.openjpa.meta.ClassMetaData[] types, boolean subclasses, org.apache.openjpa.kernel.exps.ExpressionFactory[] facts, org.apache.openjpa.kernel.exps.QueryExpressions[] parsed, Object[] params, org.apache.openjpa.kernel.StoreQuery.Range range)
          Return the commands that will be sent to the datastore in order to execute the query, typically in the database's native language.
protected  org.apache.openjpa.kernel.exps.ExpressionFactory getExpressionFactory(org.apache.openjpa.meta.ClassMetaData type)
          Return an ExpressionFactory to use to create an expression to be executed against an extent.
protected  org.apache.openjpa.meta.ClassMetaData[] getIndependentExpressionCandidates(org.apache.openjpa.meta.ClassMetaData type, boolean subclasses)
          Return the assignable types for the given metadata whose expression trees must be compiled independently.
 boolean supportsDataStoreExecution()
           
 
Methods inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery
executeDelete, executeUpdate, getFilterListener, getResolver, invalidateCompilation, newCompilation, newDataStoreExecutor, newInMemoryExecutor, populateFromCompilation, setQuery, supportsInMemoryExecution
 
Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery
evaluate, getAggregateListener, getContext, newCompilationKey, requiresCandidateType, requiresParameterDeclarations, setContext, supportsAbstractExecutors, supportsParameterDeclarations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreManagerQuery

public StoreManagerQuery(org.apache.openjpa.kernel.exps.ExpressionParser parser,
                         StoreManager store)
Method Detail

supportsDataStoreExecution

public boolean supportsDataStoreExecution()
Specified by:
supportsDataStoreExecution in interface org.apache.openjpa.kernel.StoreQuery
Overrides:
supportsDataStoreExecution in class org.apache.openjpa.kernel.AbstractStoreQuery

executeQuery

protected org.apache.openjpa.lib.rop.ResultObjectProvider executeQuery(org.apache.openjpa.kernel.StoreQuery.Executor ex,
                                                                       org.apache.openjpa.meta.ClassMetaData classMetaData,
                                                                       org.apache.openjpa.meta.ClassMetaData[] types,
                                                                       boolean subClasses,
                                                                       org.apache.openjpa.kernel.exps.ExpressionFactory[] factories,
                                                                       org.apache.openjpa.kernel.exps.QueryExpressions[] expressions,
                                                                       Object[] parameters,
                                                                       org.apache.openjpa.kernel.StoreQuery.Range range)
Execute the given expression against the given candidate extent.

Overrides:
executeQuery in class org.apache.openjpa.kernel.ExpressionStoreQuery

getDataStoreActions

protected String[] getDataStoreActions(org.apache.openjpa.meta.ClassMetaData base,
                                       org.apache.openjpa.meta.ClassMetaData[] types,
                                       boolean subclasses,
                                       org.apache.openjpa.kernel.exps.ExpressionFactory[] facts,
                                       org.apache.openjpa.kernel.exps.QueryExpressions[] parsed,
                                       Object[] params,
                                       org.apache.openjpa.kernel.StoreQuery.Range range)
Return the commands that will be sent to the datastore in order to execute the query, typically in the database's native language.

Overrides:
getDataStoreActions in class org.apache.openjpa.kernel.ExpressionStoreQuery
Parameters:
base - the base type the query should match
types - the independent candidate types
subclasses - true if subclasses should be included in the results
facts - the expression factory used to build the query for each base type
parsed - the parsed query values
params - parameter values, or empty array
range - result range
Returns:
a textual description of the query to execute

getIndependentExpressionCandidates

protected org.apache.openjpa.meta.ClassMetaData[] getIndependentExpressionCandidates(org.apache.openjpa.meta.ClassMetaData type,
                                                                                     boolean subclasses)
Return the assignable types for the given metadata whose expression trees must be compiled independently.

Overrides:
getIndependentExpressionCandidates in class org.apache.openjpa.kernel.ExpressionStoreQuery

getExpressionFactory

protected org.apache.openjpa.kernel.exps.ExpressionFactory getExpressionFactory(org.apache.openjpa.meta.ClassMetaData type)
Return an ExpressionFactory to use to create an expression to be executed against an extent. Each factory will be used to compile one filter only. The factory must be cachable.

Overrides:
getExpressionFactory in class org.apache.openjpa.kernel.ExpressionStoreQuery

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.