Examples of wasInitialized()


Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

      removeCollection( persister, extractCollectionKeyFromOwner( persister ), session );
    }
    if ( collection != null && ( collection instanceof PersistentCollection ) ) {
      PersistentCollection wrapper = ( PersistentCollection ) collection;
      wrapper.setCurrentSession( session );
      if ( wrapper.wasInitialized() ) {
        session.getPersistenceContext().addNewCollection( persister, wrapper );
      }
      else {
        reattachCollection( wrapper, type );
      }
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( !coll.wasInitialized() && coll.hasQueuedOperations() ) {
        actionQueue.addAction(
            new QueuedOperationCollectionAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

    PersistentCollection collection = event.getCollection();
    SessionImplementor source = event.getSession();

    CollectionEntry ce = source.getPersistenceContext().getCollectionEntry(collection);
    if (ce==null) throw new HibernateException("collection was evicted");
    if ( !collection.wasInitialized() ) {
      final boolean traceEnabled = LOG.isTraceEnabled();
      if ( traceEnabled ) {
        LOG.tracev( "Initializing collection {0}",
            MessageHelper.collectionInfoString( ce.getLoadedPersister(), collection, ce.getLoadedKey(), source ) );
        LOG.trace( "Checking second-level cache" );
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

    final LoadingCollectionEntry loadingCollectionEntry = loadContexts.locateLoadingCollectionEntry( collectionKey );
    if ( loadingCollectionEntry == null ) {
      // look for existing collection as part of the persistence context
      PersistentCollection collection = loadContexts.getPersistenceContext().getCollection( collectionKey );
      if ( collection != null ) {
        if ( collection.wasInitialized() ) {
          LOG.trace( "Collection already initialized; ignoring" );
          return null; // ignore this row of results! Note the early exit
        }
        LOG.trace( "Collection not yet initialized; initializing" );
      }
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

      return;
    }
    PersistentCollection persistentCollection = event.getCollection();
    final String collectionRole;
    if ( persistentCollection != null ) {
      if ( !persistentCollection.wasInitialized() ) {
        // non-initialized collections will still trigger events, but we want to skip them
        // as they won't contain new values affecting the index state
        return;
      }
      collectionRole = persistentCollection.getRole();
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

      return;
    }
    PersistentCollection persistentCollection = event.getCollection();
    final String collectionRole;
    if ( persistentCollection != null ) {
      if ( !persistentCollection.wasInitialized() ) {
        // non-initialized collections will still trigger events, but we want to skip them
        // as they won't contain new values affecting the index state
        return;
      }
      collectionRole = persistentCollection.getRole();
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

    PersistentCollection collection = event.getCollection();
    SessionImplementor source = event.getSession();

    CollectionEntry ce = source.getPersistenceContext().getCollectionEntry(collection);
    if (ce==null) throw new HibernateException("collection was evicted");
    if ( !collection.wasInitialized() ) {
      final boolean traceEnabled = LOG.isTraceEnabled();
      if ( traceEnabled ) {
        LOG.tracev( "Initializing collection {0}",
            MessageHelper.collectionInfoString( ce.getLoadedPersister(), collection, ce.getLoadedKey(), source ) );
        LOG.trace( "Checking second-level cache" );
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

                ce.isSnapshotEmpty(coll),
                session
              )
          );
      }
      if ( !coll.wasInitialized() && coll.hasQueuedOperations() ) {
        actionQueue.addAction(
            new QueuedOperationCollectionAction(
                coll,
                ce.getLoadedPersister(),
                ce.getLoadedKey(),
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

    final LoadingCollectionEntry loadingCollectionEntry = loadContexts.locateLoadingCollectionEntry( collectionKey );
    if ( loadingCollectionEntry == null ) {
      // look for existing collection as part of the persistence context
      PersistentCollection collection = loadContexts.getPersistenceContext().getCollection( collectionKey );
      if ( collection != null ) {
        if ( collection.wasInitialized() ) {
          LOG.trace( "Collection already initialized; ignoring" );
          return null; // ignore this row of results! Note the early exit
        }
        LOG.trace( "Collection not yet initialized; initializing" );
      }
View Full Code Here

Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

        return;
      }
      PersistentCollection persistentCollection = event.getCollection();
      final String collectionRole;
      if ( persistentCollection != null ) {
        if ( !persistentCollection.wasInitialized() ) {
          // non-initialized collections will still trigger events, but we want to skip them
          // as they won't contain new values affecting the index state
          return;
        }
        collectionRole = persistentCollection.getRole();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.