| The concern I see is there may be business obligations in play that allow only specific fields to be reversible while other fields are tracked in a forward-only, historical fashion. The question would then be how to influence Envers so that when history is reversed, only the allowed fields are. It may simply be sufficient to add a reversible=true/false attribute to the @Audited annotation. The proposed API might look something like:
public interface AuditReader {
void reverseHistory(Class<T> entityClass, Number restorationRevision);
}
Thoughts/Suggestions? |