All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javers.core.metamodel.annotation.IgnoreDeclaredProperties Maven / Gradle / Ivy

There is a newer version: 7.6.2
Show newest version
package org.javers.core.metamodel.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Use IgnoreDeclaredProperties annotation to mark
 * all properties declared in a given class as ignored by JaVers.
 * 

* * JaVers still tracks instances of a given class and tracks changes done on properties of * its superclass * (by contrast, if a class is annotated with {@link DiffIgnore}, JaVers completely ignores instances of * that class). * *

* For example, when you want to ignore all properties declared in a subclass B but * still track changes in properties declared in a superclass A: *
 * class A {
 *     @Id
 *     private Long id;
 *     private String name;
 * }
 * 
* * this mapping: *
 * @IgnoreDeclaredProperties
 * class B extends A {
 *     private String foo;
 *     private String bar;
 * }
 * 
* * is equivalent to: *
 * class B extends A {
 *     @DiffIgnore
 *     private String foo;
 *     @DiffIgnore
 *     private String bar;
 * }
 * 
* * @see DiffIgnore * @author Edward Mallia */ @Target({ TYPE}) @Retention(RUNTIME) public @interface IgnoreDeclaredProperties { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy