org.hibernate.search.jpa.impl
Class OptimisticLockingCompatibilityHelper
java.lang.Object
org.hibernate.search.jpa.impl.OptimisticLockingCompatibilityHelper
public class OptimisticLockingCompatibilityHelper
- extends Object
Helper class for FullTextQueryImpl
to extract information out of an
Hibernate OptimisticLockException
and create the JPA counterpart.
- Author:
- Sanne Grinovero (C) 2011 Red Hat Inc.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OptimisticLockingCompatibilityHelper
public OptimisticLockingCompatibilityHelper()
isOptimisticLockException
public static boolean isOptimisticLockException(HibernateException e)
- Parameters:
e
- an Hibernate runtime exception
- Returns:
- true if it's definitely an optimistic locking exception, false if we can't tell
convertToLockException
public static javax.persistence.OptimisticLockException convertToLockException(HibernateException e)
- Convert a provided Hibernate exception to a JPA exception. If possible entity information is added.
- Parameters:
e
- the Hibernate exception to convert
- Returns:
- A JPA optimistic lock exception
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved