com.kenshoo.pl.entity.audit.AuditTrigger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.entity.audit;
/**
* Indicates the rule by which to trigger the auditing of a field, following execution of a command.
* @see com.kenshoo.pl.entity.annotation.audit.Audited
* @see AuditRecord
*/
public enum AuditTrigger {
/**
* Indicates that a field should be audited always, regardless of whether its value has changed - whenever there is some change in the entity.
* This means that the current value of the field will always be included in {@link AuditRecord#getMandatoryFieldValues()}.
* In addition it will also be included in {@link AuditRecord#getFieldRecords()} according to the rule of {@link #ON_CREATE_OR_UPDATE} (see below).
*/
ALWAYS,
/**
* Indicates that a field should be audited only if it is either being created, or its value has been changed by an update.
* This means that:
* Upon create, the new value will be included in {@link AuditRecord#getFieldRecords()}.
* Upon update if the value has changed - the old and new values will be included in {@link AuditRecord#getFieldRecords()}.
*/
ON_CREATE_OR_UPDATE,
/**
* Indicates that a field should be audited only if its value has been changed by an update.
* This means that upon update if the value has changed - the old and new values will be included in {@link AuditRecord#getFieldRecords()}.
*/
ON_UPDATE
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy