org.hibernate.search.jpa.impl
Class OptimisticLockingCompatibilityHelper

java.lang.Object
  extended by 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.

Constructor Summary
OptimisticLockingCompatibilityHelper()
           
 
Method Summary
static javax.persistence.OptimisticLockException convertToLockException(org.hibernate.HibernateException e)
          Convert a provided Hibernate exception to a JPA exception.
static boolean isOptimisticLockException(org.hibernate.HibernateException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimisticLockingCompatibilityHelper

public OptimisticLockingCompatibilityHelper()
Method Detail

isOptimisticLockException

public static boolean isOptimisticLockException(org.hibernate.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(org.hibernate.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–2013 Hibernate. All rights reserved.