Class BeanRequest

java.lang.Object
io.ebeaninternal.server.core.BeanRequest
Direct Known Subclasses:
OrmQueryRequest, PersistRequest

public abstract class BeanRequest extends Object
Base class for find and persist requests.
  • Field Details

    • server

      protected final SpiEbeanServer server
    • transaction

      protected SpiTransaction transaction
    • createdTransaction

      protected boolean createdTransaction
  • Constructor Details

  • 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

      public Database database()
      Return the server processing the request. Made available for BeanController and BeanFinder.
    • server

      public SpiEbeanServer server()
    • transaction

      public SpiTransaction transaction()
      Return the Transaction associated with this request.
    • transaction

      public void transaction(SpiTransaction 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

      public DataTimeZone dataTimeZone()
      Return the DataTimeZone to use.