java.lang.Object
io.ebeaninternal.server.core.BeanRequest
io.ebeaninternal.server.core.PersistRequest
io.ebeaninternal.server.core.PersistRequestUpdateSql
- All Implemented Interfaces:
TxnProfileEventCodes,BatchPostExecute
Persist request specifically for CallableSql.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.ebeaninternal.server.core.PersistRequest
PersistRequest.Type -
Field Summary
Fields inherited from class io.ebeaninternal.server.core.PersistRequest
label, startNanos, typeFields inherited from class io.ebeaninternal.server.core.BeanRequest
createdTransaction, server, transactionFields inherited from interface io.ebeaninternal.api.TxnProfileEventCodes
EVT_CALLABLESQL, EVT_COMMIT, EVT_DELETE, EVT_DELETE_PERMANENT, EVT_DELETE_SOFT, EVT_INSERT, EVT_ORMUPDATE, EVT_ROLLBACK, EVT_UPDATE, EVT_UPDATESQL, FIND_ATTRIBUTE, FIND_ATTRIBUTE_SET, FIND_COUNT, FIND_DELETE, FIND_EXISTS, FIND_ID_LIST, FIND_ITERATE, FIND_MANY, FIND_MANY_LAZY, FIND_ONE, FIND_ONE_LAZY, FIND_SUBQUERY, FIND_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionPersistRequestUpdateSql(SpiEbeanServer server, SpiSqlUpdate sqlUpdate, SpiTransaction t, PersistExecute persistExecute) PersistRequestUpdateSql(SpiEbeanServer server, SpiSqlUpdate sqlUpdate, SpiTransaction t, PersistExecute persistExecute, boolean forceNoBatch) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()Add this statement to JDBC batch for later execution.voidaddToFlushQueue(int pos) Add this request to BatchControl to flush later.voidcheckRowCount(int count) No concurrency checking so just note the rowCount.voidExecute using jdbc batch.intExecute the request right now.intExecute a the request or queue/batch it for later execution.booleanReturn true if this persist request should use JDBC batch.booleanReturn true if this is a queued sql update for element collection or intersection table.booleanvoidLog the sql bind used with jdbc batch.voidPerform post execute processing.voidprofile(long offset, int flushCount) Add as event to the profiling.voidsetBindLog(String bindLog) Set the bound values.voidsetGeneratedKey(Object idValue) Not called for this type of request.voidsetType(PersistRequestUpdateSql.SqlType sqlType, String tableName) Specify the type of statement executed.voidstartBind(boolean batchThisRequest) Effectively set start nanos if we are collecting metrics on a label.Return the UpdateSql.Methods inherited from class io.ebeaninternal.server.core.PersistRequest
addTimingBatch, addTimingNoBatch, initTransIfRequired, isPersistCascade, logSql, logSummary, resetDepth, translateSqlException, typeMethods inherited from class io.ebeaninternal.server.core.BeanRequest
clearTransIfRequired, commitTransIfRequired, createImplicitTransIfRequired, database, dataTimeZone, rollbackTransIfRequired, server, transaction, transaction
-
Constructor Details
-
PersistRequestUpdateSql
public PersistRequestUpdateSql(SpiEbeanServer server, SpiSqlUpdate sqlUpdate, SpiTransaction t, PersistExecute persistExecute, boolean forceNoBatch) -
PersistRequestUpdateSql
public PersistRequestUpdateSql(SpiEbeanServer server, SpiSqlUpdate sqlUpdate, SpiTransaction t, PersistExecute persistExecute)
-
-
Method Details
-
profile
public void profile(long offset, int flushCount) Description copied from interface:BatchPostExecuteAdd as event to the profiling. -
addBatch
public void addBatch()Add this statement to JDBC batch for later execution. -
executeAddBatch
public void executeAddBatch()Execute using jdbc batch. -
addToFlushQueue
public void addToFlushQueue(int pos) Add this request to BatchControl to flush later. -
isFlushQueue
public boolean isFlushQueue()Description copied from interface:BatchPostExecuteReturn true if this is a queued sql update for element collection or intersection table. In this case we can executeBatch on the PreparedStatement.- Specified by:
isFlushQueuein interfaceBatchPostExecute- Overrides:
isFlushQueuein classPersistRequest
-
executeNow
public int executeNow()Description copied from class:PersistRequestExecute the request right now.- Specified by:
executeNowin classPersistRequest
-
isBatchThisRequest
public boolean isBatchThisRequest()Description copied from class:PersistRequestReturn true if this persist request should use JDBC batch.- Overrides:
isBatchThisRequestin classPersistRequest
-
executeOrQueue
public int executeOrQueue()Description copied from class:PersistRequestExecute a the request or queue/batch it for later execution.- Specified by:
executeOrQueuein classPersistRequest
-
updateSql
Return the UpdateSql. -
checkRowCount
public void checkRowCount(int count) No concurrency checking so just note the rowCount. -
setGeneratedKey
Not called for this type of request. -
isGetGeneratedKeys
public boolean isGetGeneratedKeys() -
setType
Specify the type of statement executed. Used to automatically register with the transaction event. -
setBindLog
Set the bound values. -
startBind
public void startBind(boolean batchThisRequest) Description copied from class:PersistRequestEffectively set start nanos if we are collecting metrics on a label.- Overrides:
startBindin classPersistRequest
-
logSqlBatchBind
public void logSqlBatchBind()Log the sql bind used with jdbc batch. -
postExecute
public void postExecute()Perform post execute processing.
-