Package org.hibernate

Examples of org.hibernate.NonUniqueObjectException


    final Object entity = getEntity( key );
    if ( entity == object ) {
      throw new AssertionFailure( "object already associated, but no entry was found" );
    }
    if ( entity != null ) {
      throw new NonUniqueObjectException( key.getIdentifier(), key.getEntityName() );
    }
  }
View Full Code Here


            .handleEntityNotFound( event.getEntityClassName(), event.getEntityId() );
      }
    }

    if ( isOptionalInstance && entity != event.getInstanceToLoad() ) {
      throw new NonUniqueObjectException( event.getEntityId(), event.getEntityClassName() );
    }

    return entity;
  }
View Full Code Here

    Object entity = getEntity(key);
    if ( entity == object ) {
      throw new AssertionFailure( "object already associated, but no entry was found" );
    }
    if ( entity != null ) {
      throw new NonUniqueObjectException( key.getIdentifier(), key.getEntityName() );
    }
  }
View Full Code Here

      if ( old != null ) {
        if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) {
          source.forceFlush( source.getPersistenceContext().getEntry( old ) );
        }
        else {
          throw new NonUniqueObjectException( id, persister.getEntityName() );
        }
      }
      persister.setIdentifier( entity, id, source );
    }
    else {
View Full Code Here

    final Object entity = getEntity( key );
    if ( entity == object ) {
      throw new AssertionFailure( "object already associated, but no entry was found" );
    }
    if ( entity != null ) {
      throw new NonUniqueObjectException( key.getIdentifier(), key.getEntityName() );
    }
  }
View Full Code Here

    Object entity = getEntity(key);
    if ( entity == object ) {
      throw new AssertionFailure( "object already associated, but no entry was found" );
    }
    if ( entity != null ) {
      throw new NonUniqueObjectException( key.getIdentifier(), key.getEntityName() );
    }
  }
View Full Code Here

        event.getSession().getFactory().getEntityNotFoundDelegate().handleEntityNotFound( event.getEntityClassName(), event.getEntityId() );
      }
    }

    if ( isOptionalInstance && entity != event.getInstanceToLoad() ) {
      throw new NonUniqueObjectException( event.getEntityId(), event.getEntityClassName() );
    }

    return entity;
  }
View Full Code Here

    Object entity = getEntity(key);
    if ( entity == object ) {
      throw new AssertionFailure( "object already associated, but no entry was found" );
    }
    if ( entity != null ) {
      throw new NonUniqueObjectException( key.getIdentifier(), key.getEntityName() );
    }
  }
View Full Code Here

    Object entity = getEntity(key);
    if ( entity == object ) {
      throw new AssertionFailure( "object already associated, but no entry was found" );
    }
    if ( entity != null ) {
      throw new NonUniqueObjectException( key.getIdentifier(), key.getEntityName() );
    }
  }
View Full Code Here

      if ( old != null ) {
        if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) {
          source.forceFlush( source.getPersistenceContext().getEntry( old ) );
        }
        else {
          throw new NonUniqueObjectException( id, persister.getEntityName() );
        }
      }
      persister.setIdentifier( entity, id, source );
    }
    else {
View Full Code Here

TOP

Related Classes of org.hibernate.NonUniqueObjectException

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.