public class CustomQuery extends BatchQuery<SQLEntity>
BatchSQLQuery
.avarage, batchBacklog, batchBacklogLimit, context, descriptor, mappings, MAX_BATCH_BACKLOG, mixing, oma, properties, query, stmt, type
Modifier | Constructor and Description |
---|---|
protected |
CustomQuery(BatchContext context,
Class<? extends SQLEntity> type,
boolean fetchId,
String sql) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildSQL()
Determines the SQL statement to prepare in
BatchQuery.prepareStmt() . |
void |
clearParameters()
Resets all previously set parameters.
|
void |
executeBatchUpdate()
Executes the statement as batched update.
|
Row |
executeUpdate()
Executes the prepared statement as update (or delete).
|
BatchSQLQuery |
query()
Executes the statement as query.
|
void |
setParameter(int oneBasedIndex,
Object value)
Sets the given parameter to the given value.
|
addBatch, close, commit, createStmt, getDescriptor, getProperties, prepareStmt, safeClose, toString, tryCommit, withCustomBatchLimit
protected CustomQuery(BatchContext context, Class<? extends SQLEntity> type, boolean fetchId, String sql)
public void clearParameters() throws SQLException
SQLException
- in case of a database errorpublic void setParameter(int oneBasedIndex, Object value) throws SQLException
oneBasedIndex
- the one-based index of the parameter to setvalue
- the parameter value to setSQLException
- in case of a database error@Nullable public Row executeUpdate() throws SQLException
SQLException
- in case of a database errorpublic void executeBatchUpdate() throws SQLException
SQLException
- in case of a database errorpublic BatchSQLQuery query()
protected void buildSQL() throws SQLException
BatchQuery
BatchQuery.prepareStmt()
.buildSQL
in class BatchQuery<SQLEntity>
SQLException
- in case of a database errorCopyright © 2018. All rights reserved.