@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface OriginalStates
This annotation allows that only modified properties are reflected to SQL UPDATE statements.
The annotated field must be a member of an Entity annotated class. The field type must
be same as the Entity annotated class.
The field must not be modified by application code.
@Entity
public class Employee {
String name;
@OriginalStates
Employee originalStates;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
...
}
Update