Module io.ebean.api

Interface BeanPersistRequest<T>


public interface BeanPersistRequest<T>
Holds the information available for a bean persist (insert, update or delete).

This is made available for the BeanPersistControllers.

  • Method Details

    • database

      default Database database()
      Return the DB processing the request.
    • getEbeanServer

      @Deprecated EbeanServer getEbeanServer()
      Deprecated.
      Deprecated migrate to database().
    • transaction

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

      @Deprecated default Transaction getTransaction()
      Deprecated.
      Deprecated migrate to transaction().
    • isCascade

      boolean isCascade()
      Return true if this request is due to cascading persist. False implies this is a "top level" request.
    • loadedProperties

      Set<String> loadedProperties()
      For an update or delete of a partially populated bean this is the set of loaded properties and otherwise returns null.
    • getLoadedProperties

      @Deprecated default Set<String> getLoadedProperties()
      Deprecated.
      Deprecated migrate to loadedProperties().
    • updatedProperties

      Set<String> updatedProperties()
      For an update this is the set of properties that where updated.

      Note that hasDirtyProperty() is a more efficient check than this method and should be preferred if it satisfies the requirement.

    • getUpdatedProperties

      @Deprecated default Set<String> getUpdatedProperties()
      Deprecated.
      Deprecated migrate to updatedProperties().
    • dirtyProperties

      boolean[] dirtyProperties()
      Flags set for dirty properties (used by ElasticSearch integration).
    • getDirtyProperties

      @Deprecated default boolean[] getDirtyProperties()
      Deprecated.
      Deprecated migrate to updatedProperties().
    • hasDirtyProperty

      boolean hasDirtyProperty(Set<String> propertyNames)
      Return true for an update request if at least one of dirty properties is contained in the given set of property names.

      This method will produce less GC compared with getUpdatedProperties() and should be preferred if it satisfies the requirement.

      Note that this method is used by the default ChangeLogFilter mechanism for when the @ChangeLog updatesThatInclude attribute has been specified.

      Parameters:
      propertyNames - a set of property names which we are checking to see if at least one of them is dirty.
    • bean

      T bean()
      Returns the bean being inserted updated or deleted.
    • getBean

      @Deprecated default T getBean()
      Deprecated.
      Deprecated migrate to bean().
    • updatedValues

      Map<String,ValuePair> updatedValues()
      Returns a map of the properties that have changed and their new and old values.
    • getUpdatedValues

      @Deprecated default Map<String,ValuePair> getUpdatedValues()
      Deprecated.
      Deprecated migrate to updatedValues().