4 Replies Latest reply on Mar 26, 2010 10:39 AM by Adam Warski

    Conditional versioning

    Maciej Biłas Newbie
      Is it possible to create something like a Filter that would based on a simple boolean result of some method decide whether the version will be persisted or not?
      For example:
      @Entity
      @Audited
      public class Foo {
        private String bar;
        // getters, setters and the rest
      }
      public class FooAuditFilter implements AuditFilter<Foo> {
        public bolean isThisVersionStored(Foo obj) {
          return obj.getBar().equals("baz")  ? false : true;
        }
      }
      + some magic to attach the filter.
      I just quickly looked into the documentation. Sorry if I missed something and the answer is already there.
      Cheers,
      Maciej