Interface PredicateSpecification<T>

Type Parameters:
T - the type of the From target to which the specification is applied.
All Superinterfaces:
Serializable
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PredicateSpecification<T> extends Serializable
Specification in the sense of Domain Driven Design.

Specifications can be composed into higher order functions from other specifications using and(PredicateSpecification), or(PredicateSpecification) or factory methods such as allOf(Iterable) with reduced type interference of the query source type.

PredicateSpecifications are building blocks for composition and do not express their type opinion towards a specific entity source or join source type for improved reuse.

Composition considers whether one or more specifications contribute to the overall predicate by returning a Predicate or null. Specifications returning null, such as unrestricted(), are considered to not contribute to the overall predicate, and their result is not considered in the final predicate.

Since:
4.0
Author:
Mark Paluch, Peter Aisher