public class JDBCStoreQuery extends ExpressionStoreQuery
ExpressionStoreQuery.AbstractExpressionExecutor, ExpressionStoreQuery.DataStoreExecutor, ExpressionStoreQuery.InMemoryExecutorAbstractStoreQuery.AbstractExecutorStoreQuery.Executor, StoreQuery.Range_parsed, _parserctxEMPTY_BOOLEANS, EMPTY_CLASSES, EMPTY_METAS, EMPTY_OBJECTS, EMPTY_ORDERED_PARAMS, EMPTY_PARAMS, EMPTY_STRINGSOP_DELETE, OP_SELECT, OP_UPDATE| Constructor and Description |
|---|
JDBCStoreQuery(JDBCStore store,
ExpressionParser parser)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(Object value,
Object ob,
Object[] params,
OpenJPAStateManager sm) |
protected Number |
executeDelete(StoreQuery.Executor ex,
ClassMetaData base,
ClassMetaData[] metas,
boolean subclasses,
ExpressionFactory[] facts,
QueryExpressions[] exps,
Object[] params)
Execute the given expression against the given candidate extent
and delete the instances.
|
protected ResultObjectProvider |
executeQuery(StoreQuery.Executor ex,
ClassMetaData base,
ClassMetaData[] metas,
boolean subclasses,
ExpressionFactory[] facts,
QueryExpressions[] exps,
Object[] params,
StoreQuery.Range range)
Execute the given expression against the given candidate extent.
|
protected Number |
executeUpdate(ClassMetaData base,
ClassMetaData[] metas,
boolean subclasses,
ExpressionFactory[] facts,
QueryExpressions[] parsed,
Object[] params) |
protected int |
executeUpdate(Connection conn,
PreparedStatement stmnt,
SQLBuffer sqlBuf,
boolean isUpdate)
This method is to provide override for non-JDBC or JDBC-like
implementation of executing update.
|
protected Number |
executeUpdate(StoreQuery.Executor ex,
ClassMetaData base,
ClassMetaData[] metas,
boolean subclasses,
ExpressionFactory[] facts,
QueryExpressions[] exps,
Object[] params)
Execute the given expression against the given candidate extent
and updates the instances.
|
protected String[] |
getDataStoreActions(ClassMetaData base,
ClassMetaData[] metas,
boolean subclasses,
ExpressionFactory[] facts,
QueryExpressions[] exps,
Object[] params,
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 ExpressionFactory |
getExpressionFactory(ClassMetaData meta)
Return an
ExpressionFactory to use to create an expression to
be executed against an extent. |
FilterListener |
getFilterListener(String tag)
Return the standard filter listener for the given tag, or null.
|
protected ClassMetaData[] |
getIndependentExpressionCandidates(ClassMetaData meta,
boolean subclasses)
Return the assignable types for the given metadata whose expression
trees must be compiled independently.
|
JDBCStore |
getStore()
Return the store.
|
static Context[] |
getThreadLocalContext() |
static Context |
getThreadLocalContext(Context orig) |
static Context |
getThreadLocalContext(Context lctx,
Context cloneFrom) |
static Select |
getThreadLocalSelect(Select select) |
Object |
newCompilationKey()
Create a new key for caching compiled query information.
|
protected PreparedStatement |
prepareStatement(Connection conn,
SQLBuffer sql)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
boolean |
supportsDataStoreExecution()
True if this query supports datastore execution, false if it
can only run in memory.
|
getCompilation, getResolver, invalidateCompilation, newCompilation, newDataStoreExecutor, newInMemoryExecutor, populateFromCompilation, setQuery, supportsInMemoryExecutiongetAggregateListener, getContext, requiresCandidateType, requiresParameterDeclarations, setContext, supportsAbstractExecutors, supportsParameterDeclarationspublic JDBCStoreQuery(JDBCStore store, ExpressionParser parser)
public JDBCStore getStore()
public FilterListener getFilterListener(String tag)
StoreQuerygetFilterListener in interface StoreQuerygetFilterListener in class ExpressionStoreQuerypublic Object newCompilationKey()
StoreQuerynewCompilationKey in interface StoreQuerynewCompilationKey in class AbstractStoreQuerypublic boolean supportsDataStoreExecution()
StoreQuerysupportsDataStoreExecution in interface StoreQuerysupportsDataStoreExecution in class AbstractStoreQueryprotected ClassMetaData[] getIndependentExpressionCandidates(ClassMetaData meta, boolean subclasses)
ExpressionStoreQuerygetIndependentExpressionCandidates in class ExpressionStoreQueryprotected ExpressionFactory getExpressionFactory(ClassMetaData meta)
ExpressionStoreQueryExpressionFactory 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.getExpressionFactory in class ExpressionStoreQueryprotected ResultObjectProvider executeQuery(StoreQuery.Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params, StoreQuery.Range range)
ExpressionStoreQueryexecuteQuery in class ExpressionStoreQueryex - current executorbase - the base type the query should matchmetas - the independent candidate typessubclasses - true if subclasses should be included in the resultsfacts - the expression factory used to build the query for
each base typeexps - the parsed query valuesparams - parameter values, or empty arrayrange - result rangeprotected Number executeDelete(StoreQuery.Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params)
ExpressionStoreQueryexecuteDelete in class ExpressionStoreQueryex - current executorbase - the base type the query should matchmetas - the independent candidate typessubclasses - true if subclasses should be included in the resultsfacts - the expression factory used to build the query for
each base typeexps - the parsed query valuesparams - parameter values, or empty arrayprotected Number executeUpdate(StoreQuery.Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params)
ExpressionStoreQueryexecuteUpdate in class ExpressionStoreQueryex - current executorbase - the base type the query should matchmetas - the independent candidate typessubclasses - true if subclasses should be included in the resultsfacts - the expression factory used to build the query for
each base typeexps - the parsed query valuesparams - parameter values, or empty arrayprotected Number executeUpdate(ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] parsed, Object[] params)
protected String[] getDataStoreActions(ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params, StoreQuery.Range range)
ExpressionStoreQuerygetDataStoreActions in class ExpressionStoreQuerybase - the base type the query should matchmetas - the independent candidate typessubclasses - true if subclasses should be included in the resultsfacts - the expression factory used to build the query for
each base typeexps - the parsed query valuesparams - parameter values, or empty arrayrange - result rangeprotected int executeUpdate(Connection conn, PreparedStatement stmnt, SQLBuffer sqlBuf, boolean isUpdate) throws SQLException
SQLExceptionprotected PreparedStatement prepareStatement(Connection conn, SQLBuffer sql) throws SQLException
SQLExceptionpublic Object evaluate(Object value, Object ob, Object[] params, OpenJPAStateManager sm)
evaluate in interface StoreQueryevaluate in class AbstractStoreQuerypublic static Context[] getThreadLocalContext()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.