Package io.ebean.bean

Class 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.

    • Constructor Detail

      • WithOption

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

      • 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).