Search in sources :

Example 6 with ObjectDeletedException

use of org.hibernate.ObjectDeletedException in project hibernate-orm by hibernate.

the class SessionImpl method fireMerge.

private Object fireMerge(MergeEvent event) {
    try {
        checkTransactionSynchStatus();
        checkNoUnresolvedActionsBeforeOperation();
        for (MergeEventListener listener : listeners(EventType.MERGE)) {
            listener.onMerge(event);
        }
        checkNoUnresolvedActionsAfterOperation();
    } catch (ObjectDeletedException sse) {
        throw exceptionConverter.convert(new IllegalArgumentException(sse));
    } catch (MappingException e) {
        throw exceptionConverter.convert(new IllegalArgumentException(e.getMessage(), e));
    } catch (RuntimeException e) {
        //including HibernateException
        throw exceptionConverter.convert(e);
    }
    return event.getResult();
}
Also used : ObjectDeletedException(org.hibernate.ObjectDeletedException) MergeEventListener(org.hibernate.event.spi.MergeEventListener) UnknownSqlResultSetMappingException(org.hibernate.procedure.UnknownSqlResultSetMappingException) MappingException(org.hibernate.MappingException)

Aggregations

ObjectDeletedException (org.hibernate.ObjectDeletedException)6 EntityEntry (org.hibernate.engine.spi.EntityEntry)3 EntityPersister (org.hibernate.persister.entity.EntityPersister)3 HibernateProxy (org.hibernate.proxy.HibernateProxy)3 MappingException (org.hibernate.MappingException)2 UnknownSqlResultSetMappingException (org.hibernate.procedure.UnknownSqlResultSetMappingException)2 LazyInitializer (org.hibernate.proxy.LazyInitializer)2 Serializable (java.io.Serializable)1 EntityNotFoundException (javax.persistence.EntityNotFoundException)1 LockMode (org.hibernate.LockMode)1 LockOptions (org.hibernate.LockOptions)1 ObjectNotFoundException (org.hibernate.ObjectNotFoundException)1 PersistentObjectException (org.hibernate.PersistentObjectException)1 TransientObjectException (org.hibernate.TransientObjectException)1 TypeMismatchException (org.hibernate.TypeMismatchException)1 EntityRegionAccessStrategy (org.hibernate.cache.spi.access.EntityRegionAccessStrategy)1 SoftLock (org.hibernate.cache.spi.access.SoftLock)1 JPA_LOCK_TIMEOUT (org.hibernate.cfg.AvailableSettings.JPA_LOCK_TIMEOUT)1 EntityKey (org.hibernate.engine.spi.EntityKey)1 SessionImplementor (org.hibernate.engine.spi.SessionImplementor)1