@FunctionalInterface
public interface IsDirtyPredicate
IsDirtyPredicate
is a strategy interface used to configure Spring Session on how to evaluate application
domain objects to determine whether they are dirty or not.Modifier and Type | Field and Description |
---|---|
static IsDirtyPredicate |
ALWAYS_DIRTY |
static IsDirtyPredicate |
NEVER_DIRTY |
Modifier and Type | Method and Description |
---|---|
default IsDirtyPredicate |
andThen(IsDirtyPredicate other)
Composes 2
IsDirtyPredicate objects using the logical AND operator. |
boolean |
isDirty(java.lang.Object oldValue,
java.lang.Object newValue)
Determines whether the
newValue is dirty relative to the oldValue . |
default IsDirtyPredicate |
orThen(IsDirtyPredicate other)
Composes 2
IsDirtyPredicate objects using the logical OR operator. |
static final IsDirtyPredicate ALWAYS_DIRTY
static final IsDirtyPredicate NEVER_DIRTY
boolean isDirty(java.lang.Object oldValue, java.lang.Object newValue)
newValue
is dirty relative to the oldValue
.oldValue
- Object
referring to the previous value.newValue
- Object
referring to the new value.newValue
is dirty
relative to the oldValue
.@NonNull default IsDirtyPredicate andThen(@Nullable IsDirtyPredicate other)
IsDirtyPredicate
objects using the logical AND operator.
The other
IsDirtyPredicate
is applied after this IsDirtyPredicate
in the isDirty(Object, Object)
comparison evaluation.
This composition is null-safe and returns this IsDirtyPredicate
if other
is null.other
- IsDirtyPredicate
composed with this IsDirtyPredicate
.IsDirtyPredicate
composition consisting of this IsDirtyPredicate
composed with the other
IsDirtyPredicate
using the logical AND operator.
Returns this IsDirtyPredicate
if other
is null.orThen(IsDirtyPredicate)
@NonNull default IsDirtyPredicate orThen(@Nullable IsDirtyPredicate other)
IsDirtyPredicate
objects using the logical OR operator.
The other
IsDirtyPredicate
is applied after this IsDirtyPredicate
in the isDirty(Object, Object)
comparison evaluation.
This composition is null-safe and returns this IsDirtyPredicate
if other
is null.other
- IsDirtyPredicate
composed with this IsDirtyPredicate
.IsDirtyPredicate
composition consisting of this IsDirtyPredicate
composed with the other
IsDirtyPredicate
using the logical OR operator.
Returns this IsDirtyPredicate
if other
is null.andThen(IsDirtyPredicate)