Package org.hibernate

Examples of org.hibernate.ObjectDeletedException


        MessageHelper.infoString( entityEntry.getPersister(), entityEntry.getId(), getFactory() )
      );
    }

    if ( persistenceContext.getCascadeLevel() > 0 ) {
      throw new ObjectDeletedException(
        "deleted object would be re-saved by cascade (remove deleted object from associations)",
        entityEntry.getId(),
        entityEntry.getPersister().getEntityName()
      );
    }
View Full Code Here


            break;
          case PERSISTENT:
            entityIsPersistent(event, copyCache);
            break;
          default: //DELETED
            throw new ObjectDeletedException(
                "deleted instance passed to merge",
                null,
                getLoggableName( event.getEntityName(), entity )
              );
        }
View Full Code Here

    EntityEntry e = persistenceContext.getEntry(object);
    if ( e == null ) {
      throw new TransientObjectException( "Given object not associated with the session" );
    }
    if ( e.getStatus() != Status.MANAGED ) {
      throw new ObjectDeletedException(
          "The given object was deleted",
          e.getId(),
          e.getPersister().getEntityName()
        );
    }
View Full Code Here

      LOG.debugf( "Flushing to force deletion of re-saved object: %s",
          MessageHelper.infoString( entityEntry.getPersister(), entityEntry.getId(), getFactory() ) );
    }

    if ( persistenceContext.getCascadeLevel() > 0 ) {
      throw new ObjectDeletedException(
        "deleted object would be re-saved by cascade (remove deleted object from associations)",
        entityEntry.getId(),
        entityEntry.getPersister().getEntityName()
      );
    }
View Full Code Here

            break;
          case PERSISTENT:
            entityIsPersistent(event, copyCache);
            break;
          default: //DELETED
            throw new ObjectDeletedException(
                "deleted instance passed to merge",
                null,
                getLoggableName( event.getEntityName(), entity )
              );
        }
View Full Code Here

        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

    EntityEntry e = persistenceContext.getEntry(object);
    if ( e == null ) {
      throw new TransientObjectException( "Given object not associated with the session" );
    }
    if ( e.getStatus() != Status.MANAGED ) {
      throw new ObjectDeletedException(
          "The given object was deleted",
          e.getId(),
          e.getPersister().getEntityName()
        );
    }
View Full Code Here

    errorIfClosed();
        if (LOG.isDebugEnabled()) LOG.debugf("Flushing to force deletion of re-saved object: %s",
                                             MessageHelper.infoString(entityEntry.getPersister(), entityEntry.getId(), getFactory()));

    if ( persistenceContext.getCascadeLevel() > 0 ) {
      throw new ObjectDeletedException(
        "deleted object would be re-saved by cascade (remove deleted object from associations)",
        entityEntry.getId(),
        entityEntry.getPersister().getEntityName()
      );
    }
View Full Code Here

    EntityEntry e = persistenceContext.getEntry(object);
    if ( e == null ) {
      throw new TransientObjectException( "Given object not associated with the session" );
    }
    if ( e.getStatus() != Status.MANAGED ) {
      throw new ObjectDeletedException(
          "The given object was deleted",
          e.getId(),
          e.getPersister().getEntityName()
        );
    }
View Full Code Here

      LOG.debugf( "Flushing to force deletion of re-saved object: %s",
          MessageHelper.infoString( entityEntry.getPersister(), entityEntry.getId(), getFactory() ) );
    }

    if ( persistenceContext.getCascadeLevel() > 0 ) {
      throw new ObjectDeletedException(
        "deleted object would be re-saved by cascade (remove deleted object from associations)",
        entityEntry.getId(),
        entityEntry.getPersister().getEntityName()
      );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.ObjectDeletedException

Copyright © 2018 www.massapicom. 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.