Examples of ObjectDeletedException


Examples of org.hibernate.ObjectDeletedException

    if ( requestedLockMode.greaterThan( entry.getLockMode() ) ) {
      // The user requested a "greater" (i.e. more restrictive) form of
      // pessimistic lock

      if ( entry.getStatus() != Status.MANAGED ) {
        throw new ObjectDeletedException(
            "attempted to lock a deleted instance",
            entry.getId(),
            entry.getPersister().getEntityName()
        );
      }
View Full Code Here

Examples of org.hibernate.ObjectDeletedException

    // this implementation is supposed to tolerate incorrect unsaved-value
    // mappings, for the purpose of backward-compatibility
    EntityEntry entry = event.getSession().getPersistenceContext().getEntry( event.getEntity() );
    if ( entry!=null ) {
      if ( entry.getStatus()== Status.DELETED ) {
        throw new ObjectDeletedException( "deleted instance passed to update()", null, event.getEntityName() );
      }
      else {
        return entityIsPersistent(event);
      }
    }
View Full Code Here

Examples of org.hibernate.ObjectDeletedException

        break;
      case TRANSIENT:
        entityIsTransient( event, createCache );
        break;
      default:
        throw new ObjectDeletedException(
            "deleted entity passed to persist",
            null,
            getLoggableName( event.getEntityName(), entity )
        );
    }
View Full Code Here

Examples of org.hibernate.ObjectDeletedException

    // this implementation is supposed to tolerate incorrect unsaved-value
    // mappings, for the purpose of backward-compatibility
    EntityEntry entry = event.getSession().getPersistenceContext().getEntry( event.getEntity() );
    if ( entry!=null ) {
      if ( entry.getStatus()==Status.DELETED ) {
        throw new ObjectDeletedException( "deleted instance passed to update()", null, event.getEntityName() );
      }
      else {
        return entityIsPersistent(event);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.