com.kenshoo.pl.entity.spi.audit.AlwaysAuditedFieldsProvider 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 additional fields from other entities that should always be added to {@link com.kenshoo.pl.entity.audit.AuditRecord}-s of the given entity.
* These fields will be added with their current values only, and can be used as additional criteria for filtering / grouping the audit records in queries.
* @see com.kenshoo.pl.entity.annotation.audit.Audited
*/
public interface AlwaysAuditedFieldsProvider {
/**
* @return fields which should always be added to an {@link com.kenshoo.pl.entity.audit.AuditRecord} for a given entity type
*/
Stream extends EntityField, ?>> getFields();
/**
* Empty implementation in case no additional fields are needed
*/
final class EmptyAlwaysAuditedFieldsProvider implements AlwaysAuditedFieldsProvider {
@Override
public Stream extends EntityField, ?>> getFields() {
return Stream.empty();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy