Annotation Type DiffIgnore


  • @Target({METHOD,FIELD,TYPE})
    @Retention(RUNTIME)
    public @interface DiffIgnore
    Use DiffIgnore annotation to mark certain properties or classes as ignored by Javers.

    Property level

    Add DiffIgnore to fields or getters (depending on selected MappingStyle) to mark them as ignored. When used on the property level, DiffIgnore is equivalent to the javax.persistence.Transient annotation.

    Usage:
     public class MyClass {
         @DiffIgnore
         String field1;
    
         String field2;
     }
     

    Class level

    Add DiffIgnore to a class to mark it as ignored.
    When a class is ignored, all properties (found in other classes) with this class type are ignored.

    Usage:
     @DiffIgnore
     public class MyClass {
         String field1;
         String field2;
     }
     
    Warning: DiffIgnore can't be mixed with DiffInclude in the same class.

    See also

    To ignore a list of fields given by name -- use DiffIgnoreProperties.
    If you want to include only certain fields/methods and ignore others -- use DiffInclude.