java.lang.Object
io.ebeaninternal.server.core.BeanRequest
- Direct Known Subclasses:
OrmQueryRequest,PersistRequest
Base class for find and persist requests.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final SpiEbeanServerprotected SpiTransaction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the transaction from the thread local for implicit transactions.voidCommit this transaction if it was created for this request.booleanA helper method for creating an implicit transaction is it is required.database()Return the server processing the request.Return the DataTimeZone to use.booleanlogSql()Return true if SQL should be logged for this transaction.booleanReturn true if SUMMARY information should be logged for this transaction.voidRollback the transaction if it was created for this request.server()Return the Transaction associated with this request.voidtransaction(SpiTransaction transaction) Set the transaction to use for this request.
-
Field Details
-
server
-
transaction
-
createdTransaction
protected boolean createdTransaction
-
-
Constructor Details
-
BeanRequest
-
-
Method Details
-
createImplicitTransIfRequired
public boolean createImplicitTransIfRequired()A helper method for creating an implicit transaction is it is required.A transaction may have been passed in or active in the thread local. If not then create one implicitly to handle the request.
- Returns:
- True if a transaction was set (from current or created).
-
commitTransIfRequired
public void commitTransIfRequired()Commit this transaction if it was created for this request. -
rollbackTransIfRequired
public void rollbackTransIfRequired()Rollback the transaction if it was created for this request. -
clearTransIfRequired
public void clearTransIfRequired()Clear the transaction from the thread local for implicit transactions. -
database
Return the server processing the request. Made available for BeanController and BeanFinder. -
server
-
transaction
Return the Transaction associated with this request. -
transaction
Set the transaction to use for this request. -
logSql
public boolean logSql()Return true if SQL should be logged for this transaction. -
logSummary
public boolean logSummary()Return true if SUMMARY information should be logged for this transaction. -
dataTimeZone
Return the DataTimeZone to use.
-