Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa » kernel » [javadoc | source]
org.apache.openjpa.kernel
public class: ExpressionStoreQuery [javadoc | source]
java.lang.Object
   org.apache.openjpa.kernel.AbstractStoreQuery
      org.apache.openjpa.kernel.ExpressionStoreQuery

All Implemented Interfaces:
    StoreQuery

Direct Known Subclasses:
    DistributedStoreQuery, JDBCStoreQuery

Implementation of an expression-based query, which can handle String-based query expressions such as JPQL and JDOQL. This implementation is suitable for in-memory operation. Override the following methods to also support datastore operation:
Nested Class Summary:
abstract public static class  ExpressionStoreQuery.AbstractExpressionExecutor  Provides support for queries that hold query information in a {@link QueryExpressions} instance. 
public static class  ExpressionStoreQuery.DataStoreExecutor  The DataStoreExecutor executes the query against the implementation's overridden {@link #executeQuery} method. 
Fields inherited from org.apache.openjpa.kernel.AbstractStoreQuery:
ctx
Constructor:
 public ExpressionStoreQuery(ExpressionParser parser) 
    Construct a query with a parser for the language.
Method from org.apache.openjpa.kernel.ExpressionStoreQuery Summary:
executeDelete,   executeQuery,   executeUpdate,   getDataStoreActions,   getExpressionFactory,   getFilterListener,   getIndependentExpressionCandidates,   getResolver,   invalidateCompilation,   newCompilation,   newDataStoreExecutor,   newInMemoryExecutor,   populateFromCompilation,   setQuery,   supportsInMemoryExecution
Methods from org.apache.openjpa.kernel.AbstractStoreQuery:
getAggregateListener,   getContext,   getFilterListener,   invalidateCompilation,   newCompilation,   newCompilationKey,   newDataStoreExecutor,   newInMemoryExecutor,   populateFromCompilation,   requiresCandidateType,   requiresParameterDeclarations,   setContext,   setQuery,   supportsAbstractExecutors,   supportsDataStoreExecution,   supportsInMemoryExecution,   supportsParameterDeclarations
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.kernel.ExpressionStoreQuery Detail:
 protected Number executeDelete(Executor ex,
    ClassMetaData base,
    ClassMetaData[] types,
    boolean subclasses,
    ExpressionFactory[] facts,
    QueryExpressions[] parsed,
    Object[] params) 
    Execute the given expression against the given candidate extent and delete the instances.
 protected ResultObjectProvider executeQuery(Executor ex,
    ClassMetaData base,
    ClassMetaData[] types,
    boolean subclasses,
    ExpressionFactory[] facts,
    QueryExpressions[] parsed,
    Object[] params,
    Range range) 
    Execute the given expression against the given candidate extent.
 protected Number executeUpdate(Executor ex,
    ClassMetaData base,
    ClassMetaData[] types,
    boolean subclasses,
    ExpressionFactory[] facts,
    QueryExpressions[] parsed,
    Object[] params) 
    Execute the given expression against the given candidate extent and updates the instances.
 protected String[] getDataStoreActions(ClassMetaData base,
    ClassMetaData[] types,
    boolean subclasses,
    ExpressionFactory[] facts,
    QueryExpressions[] parsed,
    Object[] params,
    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 ExpressionFactory getExpressionFactory(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.
 public FilterListener getFilterListener(String tag) 
 protected ClassMetaData[] getIndependentExpressionCandidates(ClassMetaData type,
    boolean subclasses) 
    Return the assignable types for the given metadata whose expression trees must be compiled independently.
 public Resolver getResolver() 
    Resolver used in parsing.
 public  void invalidateCompilation() 
 public Object newCompilation() 
 public Executor newDataStoreExecutor(ClassMetaData meta,
    boolean subs) 
 public Executor newInMemoryExecutor(ClassMetaData meta,
    boolean subs) 
 public  void populateFromCompilation(Object comp) 
 public boolean setQuery(Object query) 
    Allow direct setting of parsed state for facades that do parsing. The facade should call this method twice: once with the query string, and again with the parsed state.
 public boolean supportsInMemoryExecution()