Package org.hibernate.engine.spi

Examples of org.hibernate.engine.spi.ActionQueue$InsertActionSorter


      final String tenantIdentifier) {
    super( factory, tenantIdentifier );
    this.timestamp = timestamp;
    this.sessionOwner = sessionOwner;
    this.interceptor = interceptor == null ? EmptyInterceptor.INSTANCE : interceptor;
    this.actionQueue = new ActionQueue( this );
    this.persistenceContext = new StatefulPersistenceContext( this );

    this.autoCloseSessionEnabled = autoCloseSessionEnabled;
    this.flushBeforeCompletionEnabled = flushBeforeCompletionEnabled;
View Full Code Here


    // Schedule updates to collections:

    LOG.trace( "Scheduling collection removes/(re)creates/updates" );

    ActionQueue actionQueue = session.getActionQueue();
    for ( Map.Entry<PersistentCollection,CollectionEntry> me :
      IdentityMap.concurrentEntries( (Map<PersistentCollection,CollectionEntry>) persistenceContext.getCollectionEntries() )) {
      PersistentCollection coll = me.getKey();
      CollectionEntry ce = me.getValue();

      if ( ce.isDorecreate() ) {
        session.getInterceptor().onCollectionRecreate( coll, ce.getCurrentKey() );
        actionQueue.addAction(
            new CollectionRecreateAction(
                coll,
                ce.getCurrentPersister(),
                ce.getCurrentKey(),
                session
              )
          );
      }
      if ( ce.isDoremove() ) {
        session.getInterceptor().onCollectionRemove( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionRemoveAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( ce.isDoupdate() ) {
        session.getInterceptor().onCollectionUpdate( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionUpdateAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( !coll.wasInitialized() && coll.hasQueuedOperations() ) {
        actionQueue.addAction(
            new QueuedOperationCollectionAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                session
              )
          );
      }

    }

    actionQueue.sortCollectionActions();

    return count;
  }
View Full Code Here

    LOG.trace( "Scheduling collection removes/(re)creates/updates" );

    list = IdentityMap.entries( session.getPersistenceContext().getCollectionEntries() );
    size = list.size();
    ActionQueue actionQueue = session.getActionQueue();
    for ( int i = 0; i < size; i++ ) {
      Map.Entry me = (Map.Entry) list.get(i);
      PersistentCollection coll = (PersistentCollection) me.getKey();
      CollectionEntry ce = (CollectionEntry) me.getValue();

      if ( ce.isDorecreate() ) {
        session.getInterceptor().onCollectionRecreate( coll, ce.getCurrentKey() );
        actionQueue.addAction(
            new CollectionRecreateAction(
                coll,
                ce.getCurrentPersister(),
                ce.getCurrentKey(),
                session
              )
          );
      }
      if ( ce.isDoremove() ) {
        session.getInterceptor().onCollectionRemove( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionRemoveAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( ce.isDoupdate() ) {
        session.getInterceptor().onCollectionUpdate( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionUpdateAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }

    }

    actionQueue.sortCollectionActions();

  }
View Full Code Here

      final ConnectionReleaseMode connectionReleaseMode,
      final String tenantIdentifier) {
    super( factory, tenantIdentifier );
    this.timestamp = timestamp;
    this.interceptor = interceptor == null ? EmptyInterceptor.INSTANCE : interceptor;
    this.actionQueue = new ActionQueue( this );
    this.persistenceContext = new StatefulPersistenceContext( this );
    this.flushBeforeCompletionEnabled = flushBeforeCompletionEnabled;
    this.autoCloseSessionEnabled = autoCloseSessionEnabled;
    this.connectionReleaseMode = connectionReleaseMode;
    this.autoJoinTransactions = autoJoinTransactions;
View Full Code Here

      final String tenantIdentifier) {
    super( factory, tenantIdentifier );
    this.timestamp = timestamp;
    this.sessionOwner = sessionOwner;
    this.interceptor = interceptor == null ? EmptyInterceptor.INSTANCE : interceptor;
    this.actionQueue = new ActionQueue( this );
    this.persistenceContext = new StatefulPersistenceContext( this );

    this.autoCloseSessionEnabled = autoCloseSessionEnabled;
    this.flushBeforeCompletionEnabled = flushBeforeCompletionEnabled;
View Full Code Here

    // Schedule updates to collections:

    LOG.trace( "Scheduling collection removes/(re)creates/updates" );

    ActionQueue actionQueue = session.getActionQueue();
    for ( Map.Entry<PersistentCollection,CollectionEntry> me :
      IdentityMap.concurrentEntries( (Map<PersistentCollection,CollectionEntry>) persistenceContext.getCollectionEntries() )) {
      PersistentCollection coll = me.getKey();
      CollectionEntry ce = me.getValue();

      if ( ce.isDorecreate() ) {
        session.getInterceptor().onCollectionRecreate( coll, ce.getCurrentKey() );
        actionQueue.addAction(
            new CollectionRecreateAction(
                coll,
                ce.getCurrentPersister(),
                ce.getCurrentKey(),
                session
              )
          );
      }
      if ( ce.isDoremove() ) {
        session.getInterceptor().onCollectionRemove( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionRemoveAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( ce.isDoupdate() ) {
        session.getInterceptor().onCollectionUpdate( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionUpdateAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( !coll.wasInitialized() && coll.hasQueuedOperations() ) {
        actionQueue.addAction(
            new QueuedOperationCollectionAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                session
              )
          );
      }

    }

    actionQueue.sortCollectionActions();

    return count;
  }
View Full Code Here

      final ConnectionReleaseMode connectionReleaseMode,
      final String tenantIdentifier) {
    super( factory, tenantIdentifier );
    this.timestamp = timestamp;
    this.interceptor = interceptor == null ? EmptyInterceptor.INSTANCE : interceptor;
    this.actionQueue = new ActionQueue( this );
    this.persistenceContext = new StatefulPersistenceContext( this );
    this.flushBeforeCompletionEnabled = flushBeforeCompletionEnabled;
    this.autoCloseSessionEnabled = autoCloseSessionEnabled;
    this.connectionReleaseMode = connectionReleaseMode;
    this.autoJoinTransactions = autoJoinTransactions;
View Full Code Here

                   LOG.trace("Scheduling collection removes/(re)creates/updates");
                }

    list = IdentityMap.entries( session.getPersistenceContext().getCollectionEntries() );
    size = list.size();
    ActionQueue actionQueue = session.getActionQueue();
    for ( int i = 0; i < size; i++ ) {
      Map.Entry me = (Map.Entry) list.get(i);
      PersistentCollection coll = (PersistentCollection) me.getKey();
      CollectionEntry ce = (CollectionEntry) me.getValue();

      if ( ce.isDorecreate() ) {
        session.getInterceptor().onCollectionRecreate( coll, ce.getCurrentKey() );
        actionQueue.addAction(
            new CollectionRecreateAction(
                coll,
                ce.getCurrentPersister(),
                ce.getCurrentKey(),
                session
              )
          );
      }
      if ( ce.isDoremove() ) {
        session.getInterceptor().onCollectionRemove( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionRemoveAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( ce.isDoupdate() ) {
        session.getInterceptor().onCollectionUpdate( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionUpdateAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }

    }

    actionQueue.sortCollectionActions();

  }
View Full Code Here

    // Schedule updates to collections:

    LOG.trace( "Scheduling collection removes/(re)creates/updates" );

    ActionQueue actionQueue = session.getActionQueue();
    for ( Map.Entry<PersistentCollection,CollectionEntry> me :
      IdentityMap.concurrentEntries( (Map<PersistentCollection,CollectionEntry>) persistenceContext.getCollectionEntries() )) {
      PersistentCollection coll = me.getKey();
      CollectionEntry ce = me.getValue();

      if ( ce.isDorecreate() ) {
        session.getInterceptor().onCollectionRecreate( coll, ce.getCurrentKey() );
        actionQueue.addAction(
            new CollectionRecreateAction(
                coll,
                ce.getCurrentPersister(),
                ce.getCurrentKey(),
                session
              )
          );
      }
      if ( ce.isDoremove() ) {
        session.getInterceptor().onCollectionRemove( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionRemoveAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( ce.isDoupdate() ) {
        session.getInterceptor().onCollectionUpdate( coll, ce.getLoadedKey() );
        actionQueue.addAction(
            new CollectionUpdateAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( !coll.wasInitialized() && coll.hasQueuedOperations() ) {
        actionQueue.addAction(
            new QueuedOperationCollectionAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
                session
              )
          );
      }

    }

    actionQueue.sortCollectionActions();

  }
View Full Code Here

      final String tenantIdentifier) {
    super( factory, tenantIdentifier );
    this.timestamp = timestamp;
    this.sessionOwner = sessionOwner;
    this.interceptor = interceptor == null ? EmptyInterceptor.INSTANCE : interceptor;
    this.actionQueue = new ActionQueue( this );
    this.persistenceContext = new StatefulPersistenceContext( this );

    this.autoCloseSessionEnabled = autoCloseSessionEnabled;
    this.flushBeforeCompletionEnabled = flushBeforeCompletionEnabled;
View Full Code Here

TOP

Related Classes of org.hibernate.engine.spi.ActionQueue$InsertActionSorter

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.