Package io.ebean.bean

Class PersistenceContext.WithOption

java.lang.Object
io.ebean.bean.PersistenceContext.WithOption
Enclosing interface:
PersistenceContext

public static class PersistenceContext.WithOption extends Object
Wrapper on a bean to also indicate if a bean has been deleted.

If a bean has been deleted then for the same persistence context is should not be able to be fetched from persistence context or L2 cache.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The bean was previously deleted from this persistence context (can't hit L2 cache).
  • Constructor Summary

    Constructors
    Constructor
    Description
    The bean exists in the persistence context (and not been previously deleted).
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the bean (from the persistence context).
    boolean
    Return true if the bean was deleted.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • WithOption

      public WithOption(Object bean)
      The bean exists in the persistence context (and not been previously deleted).
  • Method Details

    • isDeleted

      public boolean isDeleted()
      Return true if the bean was deleted. This means you can't hit the L2 cache.
    • getBean

      public Object getBean()
      Return the bean (from the persistence context).