Class ValidateEntityTask
java.lang.Object
ch.tocco.nice2.persist.core.api.validation.ValidateEntityTask
- All Implemented Interfaces:
OptionalTask<List<Entity>, Map<Entity, CompleteEntityValidationResult>>, PersistTask<List<Entity>, Map<Entity, CompleteEntityValidationResult>>
public final class ValidateEntityTask
extends Object
implements OptionalTask<List<Entity>, Map<Entity, CompleteEntityValidationResult>>
A persist task that applies the validators for a entity model to an entity. It implements
the
Validation.validate(List, ValidationContext) method.
The list of entity validators is usually obtained from contributions.
The task first applies all EntityValidators and proceeds by applying FieldValidators and
configured relation model validators. The code has been moved from `EntityFacade` into here.-
Constructor Summary
ConstructorsConstructorDescriptionValidateEntityTask(FieldValidationService fieldValidationService, String entityName, Iterable<EntitiesValidator> entityValidators, ValidationContext validationContext, boolean postFlush) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OptionalTask
runMethods inherited from interface PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
ValidateEntityTask
public ValidateEntityTask(FieldValidationService fieldValidationService, String entityName, Iterable<EntitiesValidator> entityValidators, ValidationContext validationContext, boolean postFlush)
-
-
Method Details
-
doRun
- Specified by:
doRunin interfaceOptionalTask<List<Entity>, Map<Entity, CompleteEntityValidationResult>>
-
toString
-