Class JPATraversableResolver

java.lang.Object
io.micronaut.configuration.hibernate.jpa.validation.JPATraversableResolver
All Implemented Interfaces:
jakarta.validation.TraversableResolver

@Singleton public class JPATraversableResolver extends Object implements jakarta.validation.TraversableResolver
An implementation of TraversableResolver which is aware of JPA 3 and utilizes PersistenceUtil to query the reachability of a property. This resolver will be automatically enabled if JPA 3 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
  • Constructor Details

    • JPATraversableResolver

      public JPATraversableResolver()
  • Method Details

    • isReachable

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

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