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 e)
RuntimeException
convert(RuntimeException e, LockOptions lockOptions)
JDBCException
convert(SQLException e, String message)
RuntimeException
convert(HibernateException e)
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 e)
Converts the exception thrown during the transaction commit phaseprotected jakarta.persistence.PersistenceException
wrapLockException(HibernateException e, LockOptions lockOptions)
protected jakarta.persistence.PersistenceException
wrapStaleStateException(StaleStateException e)
-
-
-
Constructor Detail
-
ExceptionConverterImpl
public ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract)
-
-
Method Detail
-
convertCommitException
public RuntimeException convertCommitException(RuntimeException e)
Description copied from interface:ExceptionConverter
Converts the exception thrown during the transaction commit phase- Specified by:
convertCommitException
in interfaceExceptionConverter
- Parameters:
e
- 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 e)
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:
e
- The Hibernate exception.- Returns:
- The JPA-specified exception
-
convert
public RuntimeException convert(RuntimeException e)
- Specified by:
convert
in interfaceExceptionConverter
-
convert
public RuntimeException convert(RuntimeException e, LockOptions lockOptions)
- Specified by:
convert
in interfaceExceptionConverter
-
convert
public JDBCException convert(SQLException e, String message)
- Specified by:
convert
in interfaceExceptionConverter
-
wrapStaleStateException
protected jakarta.persistence.PersistenceException wrapStaleStateException(StaleStateException e)
-
wrapLockException
protected jakarta.persistence.PersistenceException wrapLockException(HibernateException e, LockOptions lockOptions)
-
-