Package org.hibernate.action.internal

Examples of org.hibernate.action.internal.EntityIdentityInsertAction


      EntityPersister persister,
      boolean useIdentityColumn,
      EventSource source,
      boolean shouldDelayIdentityInserts) {
    if ( useIdentityColumn ) {
      EntityIdentityInsertAction insert = new EntityIdentityInsertAction(
          values, entity, persister, isVersionIncrementDisabled(), source, shouldDelayIdentityInserts
      );
      source.getActionQueue().addAction( insert );
      return insert;
    }
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 = source.generateEntityKey( id, persister );
        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();
        key = source.generateEntityKey( id, persister );
        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

TOP

Related Classes of org.hibernate.action.internal.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.