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

com.kenshoo.pl.entity.annotation.audit.Audited Maven / Gradle / Ivy

Go to download

A Java persistence layer based on JOOQ for high performance and business flow support.

There is a newer version: 0.1.121-jooq-3.16.3
Show newest version
package com.kenshoo.pl.entity.annotation.audit;

import com.kenshoo.pl.entity.audit.AuditTrigger;
import com.kenshoo.pl.entity.spi.audit.AuditExtensions;
import com.kenshoo.pl.entity.spi.audit.AuditExtensions.EmptyAuditExtensions;

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

import static com.kenshoo.pl.entity.audit.AuditTrigger.ON_CREATE_OR_UPDATE;

/**
 * Whenever an entity or field has this annotation, it indicates that any changes to the entity / field
 * will be published (by the publisher belonging to the PersistenceLayer instance).
* When the entity-level is annotated, it implies that all fields should also be annotated unless overriden by {@link NotAudited} on the field. */ @Target({ElementType.TYPE, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface Audited { /** * @return the rule by which to trigger auditing for the annotated entity type or field.
* This attribute is valid for field-level annotations only, and will be ignored if appearing on entities.
* For the entity-level,{@link AuditTrigger#ON_CREATE_OR_UPDATE} is implied always. */ AuditTrigger trigger() default ON_CREATE_OR_UPDATE; /** * NOTE: This attribute is valid for entity-level annotations only, and will be ignored if appearing on fields. * @return extensions to the basic audit data that will be generated for the annotated entity type.
* This attribute is valid for entity-level annotations only, and will be ignored if appearing on fields. * @see AuditExtensions */ Class extensions() default EmptyAuditExtensions.class; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy