org.hibernate.cfg.beanvalidation
Class HibernateTraversableResolver
java.lang.Object
org.hibernate.cfg.beanvalidation.HibernateTraversableResolver
- All Implemented Interfaces:
- javax.validation.TraversableResolver
public class HibernateTraversableResolver
- extends Object
- implements javax.validation.TraversableResolver
Use Hibernate metadata to ignore cascade on entities.
cascade on embeddable objects or collection of embeddable objects are accepted
Also use Hibernate's native isInitialized method call.
- Author:
- Emmanuel Bernard
Method Summary |
boolean |
isCascadable(Object traversableObject,
javax.validation.Path.Node traversableProperty,
Class<?> rootBeanType,
javax.validation.Path pathToTraversableObject,
ElementType elementType)
|
boolean |
isReachable(Object traversableObject,
javax.validation.Path.Node traversableProperty,
Class<?> rootBeanType,
javax.validation.Path pathToTraversableObject,
ElementType elementType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateTraversableResolver
public HibernateTraversableResolver(EntityPersister persister,
ConcurrentHashMap<EntityPersister,Set<String>> associationsPerEntityPersister,
SessionFactoryImplementor factory)
isReachable
public boolean isReachable(Object traversableObject,
javax.validation.Path.Node traversableProperty,
Class<?> rootBeanType,
javax.validation.Path pathToTraversableObject,
ElementType elementType)
- Specified by:
isReachable
in interface javax.validation.TraversableResolver
isCascadable
public boolean isCascadable(Object traversableObject,
javax.validation.Path.Node traversableProperty,
Class<?> rootBeanType,
javax.validation.Path pathToTraversableObject,
ElementType elementType)
- Specified by:
isCascadable
in interface javax.validation.TraversableResolver
Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.