Package org.hibernate.action

Examples of org.hibernate.action.EntityIdentityInsertAction


    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        //now done in EntityIdentityInsertAction
        //persister.setIdentifier( entity, id, source.getEntityMode() );
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
        //source.getBatcher().executeBatch(); //found another way to ensure that all batched joined inserts have been executed
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here


    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        //now done in EntityIdentityInsertAction
        //persister.setIdentifier( entity, id, source.getEntityMode() );
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
        //source.getBatcher().executeBatch(); //found another way to ensure that all batched joined inserts have been executed
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        //now done in EntityIdentityInsertAction
        //persister.setIdentifier( entity, id, source.getEntityMode() );
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
        //source.getBatcher().executeBatch(); //found another way to ensure that all batched joined inserts have been executed
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        //now done in EntityIdentityInsertAction
        //persister.setIdentifier( entity, id, source.getEntityMode() );
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
        //source.getBatcher().executeBatch(); //found another way to ensure that all batched joined inserts have been executed
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        //now done in EntityIdentityInsertAction
        //persister.setIdentifier( entity, id, source.getEntityMode() );
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
        //source.getBatcher().executeBatch(); //found another way to ensure that all batched joined inserts have been executed
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier( entity, false, useIdentityColumn, source )
        .nullifyTransientReferences( values, types );
    new Nullability( source ).checkNullability( values, persister, false );

    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, source, shouldDelayIdentityInserts
      );
      if ( !shouldDelayIdentityInserts ) {
                LOG.debugf("Executing identity-insert immediately");
        source.getActionQueue().execute( insert );
        id = insert.getGeneratedId();
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness( key, entity );
      }
      else {
                LOG.debugf("Delaying identity-insert due to no transaction in progress");
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion( values, persister );
    source.getPersistenceContext().addEntity(
View Full Code Here

    new ForeignKeys.Nullifier(entity, false, useIdentityColumn, source)
        .nullifyTransientReferences(values, types);
    new Nullability(source).checkNullability( values, persister, false );
   
    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction( values, entity, persister, source, shouldDelayIdentityInserts );
      if ( ! shouldDelayIdentityInserts ) {
        log.debug( "executing identity-insert immediately" );
        source.getActionQueue().execute(insert);
        id = insert.getGeneratedId();
        //now done in EntityIdentityInsertAction
        //persister.setIdentifier( entity, id, source.getEntityMode() );
        key = new EntityKey( id, persister, source.getEntityMode() );
        source.getPersistenceContext().checkUniqueness(key, entity);
        //source.getBatcher().executeBatch(); //found another way to ensure that all batched joined inserts have been executed
      }
      else {
        log.debug( "delaying identity-insert due to no transaction in progress" );
        source.getActionQueue().addAction( insert );
        key = insert.getDelayedEntityKey();
      }
    }

    Object version = Versioning.getVersion(values, persister);
    source.getPersistenceContext().addEntity(
View Full Code Here

TOP

Related Classes of org.hibernate.action.EntityIdentityInsertAction

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.