public static class SQLStoreQuery.SQLExecutor extends AbstractStoreQuery.AbstractExecutor
| Constructor and Description |
|---|
SQLStoreQuery.SQLExecutor(SQLStoreQuery q,
ClassMetaData candidate) |
| Modifier and Type | Method and Description |
|---|---|
protected java.sql.ResultSet |
executeQuery(JDBCStore store,
java.sql.Connection conn,
java.sql.PreparedStatement stmnt,
SQLBuffer buf,
java.util.List paramList)
This method is to provide override for non-JDBC or JDBC-like
implementation of executing query.
|
ResultObjectProvider |
executeQuery(StoreQuery q,
java.lang.Object[] params,
StoreQuery.Range range)
Return the result of executing this query with the given parameter
values.
|
protected int |
executeUpdate(JDBCStore store,
java.sql.Connection conn,
java.sql.PreparedStatement stmnt,
SQLBuffer buf)
This method is to provide override for non-JDBC or JDBC-like
implementation of executing update.
|
java.lang.Number |
executeUpdate(StoreQuery q,
java.lang.Object[] params)
Updates the objects that result from the execution of the
query, retuning the number of objects that were updated.
|
java.lang.String[] |
getDataStoreActions(StoreQuery q,
java.lang.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.
|
boolean |
isPacking(StoreQuery q)
Return true if this executor packs projections into the result
class itself.
|
protected java.sql.PreparedStatement |
prepareCall(java.sql.Connection conn,
SQLBuffer buf)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing call statement.
|
protected java.sql.PreparedStatement |
prepareCall(java.sql.Connection conn,
SQLBuffer buf,
JDBCFetchConfiguration fetch,
int rsType,
int rsConcur)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing call statement.
|
protected java.sql.PreparedStatement |
prepareStatement(java.sql.Connection conn,
SQLBuffer buf)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
protected java.sql.PreparedStatement |
prepareStatement(java.sql.Connection conn,
SQLBuffer buf,
JDBCFetchConfiguration fetch,
int rsType,
int rsConcur)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
java.lang.Object[] |
toParameterArray(StoreQuery q,
java.util.Map userParams)
The given query is parsed to find the parameter tokens of the form
?n which is different than ? tokens in
actual SQL parameter tokens. |
executeDelete, getAccessPathMetaDatas, getAlias, getAscending, getOrderedParameterTypes, getOrderingValue, getParameterTypes, getProjectionAliases, getProjectionTypes, getQueryExpressions, getRange, getResultClass, getResultShape, getUpdates, hasGrouping, isAggregate, isDistinct, validatepublic SQLStoreQuery.SQLExecutor(SQLStoreQuery q, ClassMetaData candidate)
public int getOperation(StoreQuery q)
StoreQuery.ExecutorgetOperation in interface StoreQuery.ExecutorgetOperation in class AbstractStoreQuery.AbstractExecutorQueryOperationspublic java.lang.Number executeUpdate(StoreQuery q, java.lang.Object[] params)
StoreQuery.ExecutorexecuteUpdate in interface StoreQuery.ExecutorexecuteUpdate in class AbstractStoreQuery.AbstractExecutorpublic ResultObjectProvider executeQuery(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)
StoreQuery.Executorpublic java.lang.String[] getDataStoreActions(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)
StoreQuery.ExecutorgetDataStoreActions in interface StoreQuery.ExecutorgetDataStoreActions in class AbstractStoreQuery.AbstractExecutorpublic boolean isPacking(StoreQuery q)
StoreQuery.ExecutorisPacking in interface StoreQuery.ExecutorisPacking in class AbstractStoreQuery.AbstractExecutorprotected java.sql.PreparedStatement prepareCall(java.sql.Connection conn,
SQLBuffer buf)
throws java.sql.SQLException
java.sql.SQLExceptionprotected int executeUpdate(JDBCStore store, java.sql.Connection conn, java.sql.PreparedStatement stmnt, SQLBuffer buf) throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.PreparedStatement prepareCall(java.sql.Connection conn,
SQLBuffer buf,
JDBCFetchConfiguration fetch,
int rsType,
int rsConcur)
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.sql.Connection conn,
SQLBuffer buf)
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.sql.Connection conn,
SQLBuffer buf,
JDBCFetchConfiguration fetch,
int rsType,
int rsConcur)
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.ResultSet executeQuery(JDBCStore store, java.sql.Connection conn, java.sql.PreparedStatement stmnt, SQLBuffer buf, java.util.List paramList) throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object[] toParameterArray(StoreQuery q, java.util.Map userParams)
?n which is different than ? tokens in
actual SQL parameter tokens. These ?n style tokens
are replaced in the query string by ? tokens.
During the token parsing, the ordering of the tokens is recorded.
The given userParam must contain parameter keys as Integer and
the same Integers must appear in the tokens.Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.