com.kenshoo.pl.entity.spi.audit.AuditExtensions 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.spi.audit;
import com.kenshoo.pl.entity.EntityField;
import java.util.stream.Stream;
/**
* For a given entity type, provides various extensions to the basic audit data generated for that type.
* @see com.kenshoo.pl.entity.annotation.audit.Audited
*/
public interface AuditExtensions {
/**
* @return fields from different entity types, which must always be added to {@link com.kenshoo.pl.entity.audit.AuditRecord}-s of the current type.
* These fields can be used (for example) to filter / group audit records in queries later on.
*/
Stream extends EntityField, ?>> externalMandatoryFields();
/**
* Empty implementation in case no extensions are needed
*/
final class EmptyAuditExtensions implements AuditExtensions {
@Override
public Stream extends EntityField, ?>> externalMandatoryFields() {
return Stream.empty();
}
}
}