Class MementoUtil


  • public class MementoUtil
    extends java.lang.Object
    Utility class to help find the delta to persist upon saving of a persistent workflow. This class will work out-of-the-box for instances assignable to PersistenEntity. If user classes shall be handled, override the methods equals(Object, Object), identifier(Object) and clone(Object).
    • Constructor Detail

      • MementoUtil

        public MementoUtil()
    • Method Detail

      • addMementoEntity

        public void addMementoEntity​(java.lang.Object entity)
        Remember this entity after loading
        Parameters:
        entity - The entity to be remembered
      • addCurrentEntity

        public void addCurrentEntity​(java.lang.Object entity)
        Use this entity as the new
        Parameters:
        entity - the entity to be used as the new
      • identifier

        protected java.lang.Object identifier​(java.lang.Object entity)
      • clone

        protected <T> T clone​(T obj)
      • equals

        protected boolean equals​(java.lang.Object currentObject,
                                 java.lang.Object mementoObject)
      • ensureId

        protected boolean ensureId​(java.lang.String hint,
                                   java.lang.Object entity)
      • isPersistableMember

        protected boolean isPersistableMember​(java.lang.reflect.Field f)