Package org.hibernate.internal
Class ExceptionConverterImpl
- java.lang.Object
- org.hibernate.internal.ExceptionConverterImpl
- All Implemented Interfaces:
ExceptionConverter
public classExceptionConverterImplextendsObjectimplementsExceptionConverter
Constructor Summary
Constructors Constructor Description ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeExceptionconvert(RuntimeException exception)RuntimeExceptionconvert(RuntimeException exception,LockOptions lockOptions)JDBCExceptionconvert(SQLException e,String message)RuntimeExceptionconvert(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.RuntimeExceptionconvert(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.RuntimeExceptionconvertCommitException(RuntimeException exception)Converts the exception thrown during the transaction commit phaseprotectedPersistenceExceptionwrapLockException(HibernateException exception,LockOptions lockOptions)protectedPersistenceExceptionwrapStaleStateException(StaleStateException exception)
Constructor Detail
ExceptionConverterImpl
public ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract)
Method Detail
convertCommitException
public RuntimeException convertCommitException(RuntimeException exception)
Description copied from interface:ExceptionConverterConverts the exception thrown during the transaction commit phase- Specified by:
convertCommitExceptionin interfaceExceptionConverter- Parameters:
exception- The exception being handled- Returns:
- The converted exception
convert
public RuntimeException convert(HibernateException exception,LockOptions lockOptions)
Description copied from interface:ExceptionConverterConverts 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:
convertin 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:ExceptionConverterConverts 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:
convertin interfaceExceptionConverter- Parameters:
exception- The Hibernate exception.- Returns:
- The JPA-specified exception
convert
public RuntimeException convert(RuntimeException exception)
- Specified by:
convertin interfaceExceptionConverter
convert
public RuntimeException convert(RuntimeException exception,LockOptions lockOptions)
- Specified by:
convertin interfaceExceptionConverter
convert
public JDBCException convert(SQLException e,String message)
- Specified by:
convertin interfaceExceptionConverter
wrapStaleStateException
protected PersistenceException wrapStaleStateException(StaleStateException exception)
wrapLockException
protected PersistenceException wrapLockException(HibernateException exception,LockOptions lockOptions)