Package org.datanucleus
Class BeanValidationHandler.PersistenceTraversalResolver
java.lang.Object
org.datanucleus.BeanValidationHandler.PersistenceTraversalResolver
- All Implemented Interfaces:
javax.validation.TraversableResolver
- Enclosing class:
BeanValidationHandler
static class BeanValidationHandler.PersistenceTraversalResolver
extends Object
implements javax.validation.TraversableResolver
Resolver for traversal of validation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isCascadable
(Object traversableObject, javax.validation.Path.Node traversableProperty, Class<?> rootBeanType, javax.validation.Path pathToTraversableObject, ElementType elementType) Determine if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as@Valid
.boolean
isReachable
(Object traversableObject, javax.validation.Path.Node traversableProperty, Class<?> rootBeanType, javax.validation.Path pathToTraversableObject, ElementType elementType) Determine if the Bean Validation provider is allowed to reach the property state
-
Field Details
-
ec
-
-
Constructor Details
-
PersistenceTraversalResolver
PersistenceTraversalResolver(ExecutionContext ec)
-
-
Method Details
-
isCascadable
public boolean isCascadable(Object traversableObject, javax.validation.Path.Node traversableProperty, Class<?> rootBeanType, javax.validation.Path pathToTraversableObject, ElementType elementType) Determine if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as@Valid
. Note that this method is called only ifisReachable
returns true for the same set of arguments and if the property is marked as@Valid
- Specified by:
isCascadable
in interfacejavax.validation.TraversableResolver
- Parameters:
traversableObject
- object hostingtraversableProperty
or null ifvalidateValue
is calledtraversableProperty
- the traversable property.rootBeanType
- type of the root object passed to the Validator.pathToTraversableObject
- path from the root object totraversableObject
(using the path specification defined by Bean Validator).elementType
- eitherFIELD
orMETHOD
.- Returns:
true
if the Bean Validation provider is allowed to cascade validation,false
otherwise.
-
isReachable
public boolean isReachable(Object traversableObject, javax.validation.Path.Node traversableProperty, Class<?> rootBeanType, javax.validation.Path pathToTraversableObject, ElementType elementType) Determine if the Bean Validation provider is allowed to reach the property state- Specified by:
isReachable
in interfacejavax.validation.TraversableResolver
- Parameters:
traversableObject
- object hostingtraversableProperty
or null ifvalidateValue
is calledtraversableProperty
- the traversable property.rootBeanType
- type of the root object passed to the Validator.pathToTraversableObject
- path from the root object totraversableObject
(using the path specification defined by Bean Validator).elementType
- eitherFIELD
orMETHOD
.- Returns:
true
if the Bean Validation provider is allowed to reach the property state,false
otherwise.
-