org.javers.spring.annotation.JaversAuditableDelete Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-spring Show documentation
Show all versions of javers-spring Show documentation
JaVers object auditing and diff framework
package org.javers.spring.annotation;
import org.javers.core.Javers;
import org.javers.spring.auditable.aspect.JaversAuditableAspect;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Enables auto-audit when put on a deleting method (typically on a Repository method)
*
*
* Triggers {@link Javers#commitShallowDelete} for each method argument.
*
*
* Usage:
*
*
* {@literal @}JaversAuditableDelete
* void delete(DummyEntity entity) {
* ...
* }
*
*
* or:
*
*
* {@literal @}JaversAuditableDelete(entity = DummyEntity)
* void deleteById(String id) {
* ...
* }
*
* @see JaversAuditableAspect
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface JaversAuditableDelete {
/**
* Entity class, required only when deleting by id, for example:
*/
Class> entity() default Void.class;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy