Top Fields Constructors Methods
org.hibernate.internal

public Class ExceptionConverterImpl

extends Object
implements ExceptionConverter
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.spi.ExceptionConverter
Imports
java.io.Serializable, java.sql.SQLException, javax.persistence.EntityExistsException, .EntityNotFoundException, .LockTimeoutException, .NoResultException, .NonUniqueResultException, .OptimisticLockException, .PersistenceException, .PessimisticLockException, .QueryTimeoutException, .RollbackException, org.hibernate.HibernateException, .JDBCException, .LockOptions, .ObjectNotFoundException, .QueryException, .StaleObjectStateException, .StaleStateException, .TransientObjectException, .UnresolvableObjectException, org.hibernate.dialect.lock.LockingStrategyException, .OptimisticEntityLockException, .PessimisticEntityLockException, org.hibernate.engine.spi.ExceptionConverter, .SharedSessionContractImplementor, org.hibernate.exception.LockAcquisitionException, org.hibernate.loader.MultipleBagFetchException

Author
Andrea Boriero

Field Summary

Modifier and TypeField and Description
private final boolean
private static final EntityManagerMessageLogger
private final boolean
private final SharedSessionContractImplementor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public RuntimeException
convert(HibernateException
The Hibernate exception.
e
,
LockOptions
The lock options in effect at the time of exception (can be null)
lockOptions
)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

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.
public RuntimeException
convert(HibernateException
The Hibernate exception.
e
)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

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.
public RuntimeException
public RuntimeException
public JDBCException
public RuntimeException
convertCommitException(RuntimeException
The exception being handled
e
)

Implements org.hibernate.engine.spi.ExceptionConverter.convertCommitException.

Converts the exception thrown during the transaction commit phase
private void
protected PersistenceException
protected PersistenceException
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isJpaBootstrapback to summary
private final boolean isJpaBootstrap
logback to summary
private static final EntityManagerMessageLogger log
nativeExceptionHandling51Complianceback to summary
private final boolean nativeExceptionHandling51Compliance
sharedSessionContractback to summary
private final SharedSessionContractImplementor sharedSessionContract

Constructor Detail

ExceptionConverterImplback to summary
public ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract)

Method Detail

convertback to summary
public RuntimeException convert(HibernateException e, LockOptions lockOptions)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

Doc from org.hibernate.engine.spi.ExceptionConverter.convert.

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.

Parameters
e:HibernateException

The Hibernate exception.

lockOptions:LockOptions

The lock options in effect at the time of exception (can be null)

Returns:RuntimeException

The JPA-specified exception

Annotations
@Override
convertback to summary
public RuntimeException convert(HibernateException e)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

Doc from org.hibernate.engine.spi.ExceptionConverter.convert.

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.

Parameters
e:HibernateException

The Hibernate exception.

Returns:RuntimeException

The JPA-specified exception

Annotations
@Override
convertback to summary
public RuntimeException convert(RuntimeException e)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

Annotations
@Override
convertback to summary
public RuntimeException convert(RuntimeException e, LockOptions lockOptions)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

Annotations
@Override
convertback to summary
public JDBCException convert(SQLException e, String message)

Implements org.hibernate.engine.spi.ExceptionConverter.convert.

Annotations
@Override
convertCommitExceptionback to summary
public RuntimeException convertCommitException(RuntimeException e)

Implements org.hibernate.engine.spi.ExceptionConverter.convertCommitException.

Doc from org.hibernate.engine.spi.ExceptionConverter.convertCommitException.

Converts the exception thrown during the transaction commit phase

Parameters
e:RuntimeException

The exception being handled

Returns:RuntimeException

The converted exception

Annotations
@Override
handlePersistenceExceptionback to summary
private void handlePersistenceException(PersistenceException e)
wrapLockExceptionback to summary
protected PersistenceException wrapLockException(HibernateException e, LockOptions lockOptions)
wrapStaleStateExceptionback to summary
protected PersistenceException wrapStaleStateException(StaleStateException e)