Packageorg.granite.validation
Classpublic class DefaultTraversableResolver
ImplementsITraversableResolver

Default implementation of the ITraversableResolver. This implementation takes care of lazy-initialized beans or collections.



Public Methods
 MethodDefined by
  
isCascadable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean
Determine if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as [Valid].
DefaultTraversableResolver
  
isReachable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean
Determine if the Bean Validation provider is allowed to reach the property state
DefaultTraversableResolver
Method detail
isCascadable()method
public function isCascadable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean

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 if isReachable returns true for the same set of arguments and if the property is marked as [Valid]

Parameters
traversableObject:Object — object hosting traversableProperty or null if validateValue is called
 
traversableProperty:INode — the traversable property.
 
rootBeanType:Type — type of the root object passed to the Validator.
 
pathToTraversableObject:IPath — path from the root object to traversableObject (using the path specification defined by Bean Validator).
 
elementType:IAnnotatedElement — either FIELD or METHOD.

Returns
Booleantrue if the Bean Validation provider is allowed to cascade validation, false otherwise.
isReachable()method 
public function isReachable(traversableObject:Object, traversableProperty:INode, rootBeanType:Type, pathToTraversableObject:IPath, elementType:IAnnotatedElement):Boolean

Determine if the Bean Validation provider is allowed to reach the property state

Parameters
traversableObject:Object — object hosting traversableProperty or null if validateValue is called
 
traversableProperty:INode — the traversable property.
 
rootBeanType:Type — type of the root object passed to the Validator.
 
pathToTraversableObject:IPath — path from the root object to traversableObject (using the path specification defined by Bean Validator).
 
elementType:IAnnotatedElement — either FIELD or METHOD.

Returns
Booleantrue if the Bean Validation provider is allowed to reach the property state, false otherwise.