Annotation Interface DiffInclude


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface DiffInclude
Use DiffInclude annotation to tell JaVers which properties to include in diff/commit operations for a given class. All other properties in this class and all properties in its subclasses will be ignored by JaVers.
If some properties in a subclass should be included, apply the DiffInclude annotation on them.

For example, JaVers will ignore bar in the A class and both bar and qux in the B class.
 class A {
     @Id
     @DiffInclude
     private Long id;

     @DiffInclude
     private String foo;

     private String bar;
 }

 class B extends A {
     private String qux;
 }
 
The above is equivalent to:
 class A {
     @Id
     private Long id;

     private String foo;

     @DiffIgnore
     private String bar;
 }

 class B extends A {
     @DiffIgnore
     private String qux;
 }
 
Warning: DiffInclude can't be mixed with DiffIgnore in the same class.
See Also: