|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.kernel.AbstractStoreQuery org.apache.openjpa.kernel.ExpressionStoreQuery org.apache.openjpa.jdbc.kernel.JDBCStoreQuery
public class JDBCStoreQuery
JDBC query implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery |
---|
ExpressionStoreQuery.AbstractExpressionExecutor, ExpressionStoreQuery.DataStoreExecutor |
Nested classes/interfaces inherited from class org.apache.openjpa.kernel.AbstractStoreQuery |
---|
AbstractStoreQuery.AbstractExecutor |
Nested classes/interfaces inherited from interface org.apache.openjpa.kernel.StoreQuery |
---|
StoreQuery.Executor, 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_PARAMS, EMPTY_STRINGS |
Fields inherited from interface org.apache.openjpa.kernel.QueryOperations |
---|
OP_DELETE, OP_SELECT, OP_UPDATE |
Constructor Summary | |
---|---|
JDBCStoreQuery(JDBCStore store,
ExpressionParser parser)
Constructor. |
Method Summary | |
---|---|
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. |
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. |
Methods inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery |
---|
getResolver, invalidateCompilation, newCompilation, newDataStoreExecutor, newInMemoryExecutor, populateFromCompilation, setQuery, supportsInMemoryExecution |
Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery |
---|
getAggregateListener, getContext, 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 |
---|
public JDBCStoreQuery(JDBCStore store, ExpressionParser parser)
Method Detail |
---|
public JDBCStore getStore()
public FilterListener getFilterListener(String tag)
StoreQuery
getFilterListener
in interface StoreQuery
getFilterListener
in class ExpressionStoreQuery
public Object newCompilationKey()
StoreQuery
newCompilationKey
in interface StoreQuery
newCompilationKey
in class AbstractStoreQuery
public boolean supportsDataStoreExecution()
StoreQuery
supportsDataStoreExecution
in interface StoreQuery
supportsDataStoreExecution
in class AbstractStoreQuery
protected ClassMetaData[] getIndependentExpressionCandidates(ClassMetaData meta, boolean subclasses)
ExpressionStoreQuery
getIndependentExpressionCandidates
in class ExpressionStoreQuery
protected ExpressionFactory getExpressionFactory(ClassMetaData meta)
ExpressionStoreQuery
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.
getExpressionFactory
in class ExpressionStoreQuery
protected ResultObjectProvider executeQuery(StoreQuery.Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params, StoreQuery.Range range)
ExpressionStoreQuery
executeQuery
in class ExpressionStoreQuery
ex
- 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 range
protected Number executeDelete(StoreQuery.Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params)
ExpressionStoreQuery
executeDelete
in class ExpressionStoreQuery
ex
- 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 array
protected Number executeUpdate(StoreQuery.Executor ex, ClassMetaData base, ClassMetaData[] metas, boolean subclasses, ExpressionFactory[] facts, QueryExpressions[] exps, Object[] params)
ExpressionStoreQuery
executeUpdate
in class ExpressionStoreQuery
ex
- 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 array
protected 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)
ExpressionStoreQuery
getDataStoreActions
in class ExpressionStoreQuery
base
- 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 range
protected int executeUpdate(Connection conn, PreparedStatement stmnt, SQLBuffer sqlBuf, boolean isUpdate) throws SQLException
SQLException
protected PreparedStatement prepareStatement(Connection conn, SQLBuffer sql) throws SQLException
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |