public interface PopulateValueRequestValidator
extends org.springframework.core.Ordered
This is injected into the BasicPersistenceModule and invoked prior to any attempts to actually populate values
from the Entity DTO representation into the Hibernate entity using the FieldPersistenceProvider paradigm.
An example validator would ensure that Booleans are actually booleans, integers are actually integers, etc. since all values come in as Strings by default
FieldPersistenceProvider},
PopulateValueRequest},
BasicPersistenceModule#createPopulatedInstance(Serializable, Entity, java.util.Map, Boolean)}| Modifier and Type | Method and Description |
|---|---|
PropertyValidationResult |
validate(PopulateValueRequest populateValueRequest,
Serializable instance)
Validates a population request prior to invoking any
FieldPersistenceProviders. |
PropertyValidationResult validate(PopulateValueRequest populateValueRequest, Serializable instance)
FieldPersistenceProviders. If no validation could be
performed for the given PopulateValueRequest then return true to let it pass on to a different
PopulateValueRequestValidator or on to a FieldPersistenceProvider.populateValueRequest - the PopulateValueRequest that should be validatedinstance - the Hibernate entity that will attempt to be populatedPopulateValueRequest failed validation. In this case, the request should not be passed
to any FieldPersistenceProviders.Copyright © 2017. All rights reserved.