Package com.kenshoo.pl.entity.spi
Interface ImmutableFieldValidator<E extends EntityType<E>,T>
-
- Type Parameters:
E- entity typeT- immutable field type
- All Superinterfaces:
ChangeValidator
- All Known Implementing Classes:
ImmutableFieldValidatorImpl
public interface ImmutableFieldValidator<E extends EntityType<E>,T> extends ChangeValidator
A validator that prevents a field from being modified (can only be set by a CREATE command).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.stream.Stream<EntityField<?,?>>fetchFields()java.lang.StringgetErrorCode()EntityField<E,T>immutableField()default java.util.function.Predicate<CurrentEntityState>immutableWhen()
-
-
-
Method Detail
-
immutableField
EntityField<E,T> immutableField()
- Returns:
- the field that should not be modified
-
getErrorCode
java.lang.String getErrorCode()
- Returns:
- the error code to return if a modification of the field is attempted
-
fetchFields
default java.util.stream.Stream<EntityField<?,?>> fetchFields()
- Returns:
- a list of fields to fetch.
-
immutableWhen
default java.util.function.Predicate<CurrentEntityState> immutableWhen()
- Returns:
- Predicate when should validate field.
-
-