Class JPATraversableResolver

  • All Implemented Interfaces:
    javax.validation.TraversableResolver

    @Singleton
    public class JPATraversableResolver
    extends java.lang.Object
    implements javax.validation.TraversableResolver
    An implementation of TraversableResolver which is aware of JPA 2 and utilizes PersistenceUtil to query the reachability of a property. This resolver will be automatically enabled if JPA 2 is on the classpath and the default TraversableResolver is used.

    This class needs to be public as it's instantiated via a privileged action that is not in this package.

    Author:
    Hardy Ferentschik, Emmanuel Bernard
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isCascadable​(java.lang.Object traversableObject, javax.validation.Path.Node traversableProperty, java.lang.Class<?> rootBeanType, javax.validation.Path pathToTraversableObject, java.lang.annotation.ElementType elementType)  
      boolean isReachable​(java.lang.Object traversableObject, javax.validation.Path.Node traversableProperty, java.lang.Class<?> rootBeanType, javax.validation.Path pathToTraversableObject, java.lang.annotation.ElementType elementType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JPATraversableResolver

        public JPATraversableResolver()
    • Method Detail

      • isReachable

        public final boolean isReachable​(java.lang.Object traversableObject,
                                         javax.validation.Path.Node traversableProperty,
                                         java.lang.Class<?> rootBeanType,
                                         javax.validation.Path pathToTraversableObject,
                                         java.lang.annotation.ElementType elementType)
        Specified by:
        isReachable in interface javax.validation.TraversableResolver
      • isCascadable

        public final boolean isCascadable​(java.lang.Object traversableObject,
                                          javax.validation.Path.Node traversableProperty,
                                          java.lang.Class<?> rootBeanType,
                                          javax.validation.Path pathToTraversableObject,
                                          java.lang.annotation.ElementType elementType)
        Specified by:
        isCascadable in interface javax.validation.TraversableResolver