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 EntityValidator
s and proceeds by applying FieldValidator
s and
configured relation model validators. The code has been moved from `EntityFacade` into here.-
Constructor Summary
ConstructorDescriptionValidateEntityTask
(FieldValidationService fieldValidationService, String entityName, Iterable<EntitiesValidator> entityValidators, ValidationContext validationContext, boolean postFlush) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.OptionalTask
run
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.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:
doRun
in interfaceOptionalTask<List<Entity>,
Map<Entity, CompleteEntityValidationResult>>
-
toString
-