Interface ModificationAware

  • All Known Subinterfaces:
    ModificationAwareExt
    All Known Implementing Classes:
    ModificationAwareHandler

    public interface ModificationAware
    Extension interface that gives the possibility to check if a bean has been modified since creation or last reset of the modification flag (via resetModified()).
    A bean is considered as modified as soon as a setter has been called, regardless if the setter call actually changed the value of the field.
    If you need to know in detail which fields had been modified use sub interface ModificationAwareExt.

    This can for example used with persistence frameworks to decide if a bean has been touched in prior code and needs to be stored.

    • Method Detail

      • isModified

        boolean isModified()
        Returns:
        true if the bean is dirty, that is, if a setter has been called since creation or last resetModified()
      • resetModified

        void resetModified()
        Sets a bean to not modified. If the bean was not dirty it does nothing.