Package org.hibernate.internal
Class ExceptionConverterImpl
- java.lang.Object
-
- org.hibernate.internal.ExceptionConverterImpl
-
- All Implemented Interfaces:
ExceptionConverter
public class ExceptionConverterImpl extends Object implements ExceptionConverter
-
-
Constructor Summary
Constructors Constructor Description ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeException
convert(RuntimeException exception)
RuntimeException
convert(RuntimeException exception, LockOptions lockOptions)
JDBCException
convert(SQLException e, String message)
RuntimeException
convert(HibernateException exception)
Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.RuntimeException
convert(HibernateException exception, LockOptions lockOptions)
Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.RuntimeException
convertCommitException(RuntimeException exception)
Converts the exception thrown during the transaction commit phaseprotected PersistenceException
wrapLockException(HibernateException exception, LockOptions lockOptions)
protected PersistenceException
wrapStaleStateException(StaleStateException exception)
-
-
-
Constructor Detail
-
ExceptionConverterImpl
public ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract)
-
-
Method Detail
-
convertCommitException
public RuntimeException convertCommitException(RuntimeException exception)
Description copied from interface:ExceptionConverter
Converts the exception thrown during the transaction commit phase- Specified by:
convertCommitException
in interfaceExceptionConverter
- Parameters:
exception
- The exception being handled- Returns:
- The converted exception
-
convert
public RuntimeException convert(HibernateException exception, LockOptions lockOptions)
Description copied from interface:ExceptionConverter
Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.- Specified by:
convert
in interfaceExceptionConverter
- Parameters:
exception
- The Hibernate exception.lockOptions
- The lock options in effect at the time of exception (can be null)- Returns:
- The JPA-specified exception
-
convert
public RuntimeException convert(HibernateException exception)
Description copied from interface:ExceptionConverter
Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.- Specified by:
convert
in interfaceExceptionConverter
- Parameters:
exception
- The Hibernate exception.- Returns:
- The JPA-specified exception
-
convert
public RuntimeException convert(RuntimeException exception)
- Specified by:
convert
in interfaceExceptionConverter
-
convert
public RuntimeException convert(RuntimeException exception, LockOptions lockOptions)
- Specified by:
convert
in interfaceExceptionConverter
-
convert
public JDBCException convert(SQLException e, String message)
- Specified by:
convert
in interfaceExceptionConverter
-
wrapStaleStateException
protected PersistenceException wrapStaleStateException(StaleStateException exception)
-
wrapLockException
protected PersistenceException wrapLockException(HibernateException exception, LockOptions lockOptions)
-
-