Package io.ebeaninternal.server.core
Class PersistRequestUpdateSql
- java.lang.Object
-
- io.ebeaninternal.server.core.BeanRequest
-
- io.ebeaninternal.server.core.PersistRequest
-
- io.ebeaninternal.server.core.PersistRequestUpdateSql
-
- All Implemented Interfaces:
TxnProfileEventCodes
,BatchPostExecute
public final class PersistRequestUpdateSql extends PersistRequest
Persist request specifically for CallableSql.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PersistRequestUpdateSql.SqlType
-
Nested classes/interfaces inherited from class io.ebeaninternal.server.core.PersistRequest
PersistRequest.Type
-
-
Field Summary
-
Fields 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_COUNT, FIND_DELETE, FIND_ID_LIST, FIND_ITERATE, FIND_MANY, FIND_MANY_LAZY, FIND_ONE, FIND_ONE_LAZY, FIND_SUBQUERY, FIND_UPDATE
-
-
Constructor Summary
Constructors Constructor Description PersistRequestUpdateSql(SpiEbeanServer server, SpiSqlUpdate sqlUpdate, SpiTransaction t, PersistExecute persistExecute)
PersistRequestUpdateSql(SpiEbeanServer server, SpiSqlUpdate sqlUpdate, SpiTransaction t, PersistExecute persistExecute, boolean forceNoBatch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addBatch()
Add this statement to JDBC batch for later execution.void
addToFlushQueue(boolean early)
Add this request to BatchControl to flush later.void
checkRowCount(int count)
No concurrency checking so just note the rowCount.void
executeAddBatch()
Execute using jdbc batch.int
executeNow()
Execute the request right now.int
executeOrQueue()
Execute a the request or queue/batch it for later execution.SpiSqlUpdate
getUpdateSql()
Return the UpdateSql.boolean
isBatchThisRequest()
Return true if this persist request should use JDBC batch.boolean
isFlushQueue()
Return true if this is a queued sql update for element collection or intersection table.boolean
isGetGeneratedKeys()
void
logSqlBatchBind()
Log the sql bind used with jdbc batch.void
postExecute()
Perform post execute processing.void
profile(long offset, int flushCount)
Add as event to the profiling.void
setBindLog(String bindLog)
Set the bound values.void
setGeneratedKey(Object idValue)
Not called for this type of request.void
setType(PersistRequestUpdateSql.SqlType sqlType, String tableName)
Specify the type of statement executed.void
startBind(boolean batchThisRequest)
Effectively set start nanos if we are collecting metrics on a label.-
Methods inherited from class io.ebeaninternal.server.core.PersistRequest
addTimingBatch, addTimingNoBatch, getType, initTransIfRequired, isLogSql, isLogSummary, isPersistCascade, translateSqlException
-
Methods inherited from class io.ebeaninternal.server.core.BeanRequest
clearTransIfRequired, commitTransIfRequired, createImplicitTransIfRequired, getDataTimeZone, getEbeanServer, getServer, getTransaction, rollbackTransIfRequired, setTransaction
-
-
-
-
Constructor Detail
-
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 Detail
-
profile
public void profile(long offset, int flushCount)
Description copied from interface:BatchPostExecute
Add as event to the profiling.
-
addBatch
public int addBatch()
Add this statement to JDBC batch for later execution.
-
executeAddBatch
public void executeAddBatch()
Execute using jdbc batch.
-
addToFlushQueue
public void addToFlushQueue(boolean early)
Add this request to BatchControl to flush later.
-
isFlushQueue
public boolean isFlushQueue()
Description copied from interface:BatchPostExecute
Return 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:
isFlushQueue
in interfaceBatchPostExecute
- Overrides:
isFlushQueue
in classPersistRequest
-
executeNow
public int executeNow()
Description copied from class:PersistRequest
Execute the request right now.- Specified by:
executeNow
in classPersistRequest
-
isBatchThisRequest
public boolean isBatchThisRequest()
Description copied from class:PersistRequest
Return true if this persist request should use JDBC batch.- Overrides:
isBatchThisRequest
in classPersistRequest
-
executeOrQueue
public int executeOrQueue()
Description copied from class:PersistRequest
Execute a the request or queue/batch it for later execution.- Specified by:
executeOrQueue
in classPersistRequest
-
getUpdateSql
public SpiSqlUpdate getUpdateSql()
Return the UpdateSql.
-
checkRowCount
public void checkRowCount(int count)
No concurrency checking so just note the rowCount.
-
setGeneratedKey
public void setGeneratedKey(Object idValue)
Not called for this type of request.
-
isGetGeneratedKeys
public boolean isGetGeneratedKeys()
-
setType
public void setType(PersistRequestUpdateSql.SqlType sqlType, String tableName)
Specify the type of statement executed. Used to automatically register with the transaction event.
-
setBindLog
public void setBindLog(String bindLog)
Set the bound values.
-
startBind
public void startBind(boolean batchThisRequest)
Description copied from class:PersistRequest
Effectively set start nanos if we are collecting metrics on a label.- Overrides:
startBind
in classPersistRequest
-
logSqlBatchBind
public void logSqlBatchBind()
Log the sql bind used with jdbc batch.
-
postExecute
public void postExecute()
Perform post execute processing.
-
-