Package org.hibernate.engine

Examples of org.hibernate.engine.NonFlushedChanges


   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here


   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

    int fetches = ( int ) getSessions().getStatistics().getEntityFetchCount();
    assertEquals( count, fetches );
  }

  protected Session applyNonFlushedChangesToNewSessionCloseOldSession(Session oldSession) {
    NonFlushedChanges nfc = ( ( SessionImplementor ) oldSession ).getNonFlushedChanges();
    byte[] bytes = SerializationHelper.serialize( nfc );
    NonFlushedChanges nfc2 = ( NonFlushedChanges ) SerializationHelper.deserialize( bytes );
    Session newSession = openSession();
    ( ( SessionImplementor ) newSession ).applyNonFlushedChanges( nfc2 );
    oldToNewEntityRefs.clear();
    for ( Iterator it = ( ( SessionImplementor ) oldSession ).getPersistenceContext()
        .getEntitiesByKey()
View Full Code Here

    oldSession.close();
    return newSession;
  }

  protected void applyNonFlushedChangesToClearedSession(Session s) {
    NonFlushedChanges nfc = ( ( SessionImplementor ) s ).getNonFlushedChanges();
    byte[] bytes = SerializationHelper.serialize( nfc );
    NonFlushedChanges nfc2 = ( NonFlushedChanges ) SerializationHelper.deserialize( bytes );
    s.clear();
    ( ( SessionImplementor ) s ).applyNonFlushedChanges( nfc2 );
  }
View Full Code Here

   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

   * @return The non-flushed changes.
   */
  public NonFlushedChanges getNonFlushedChanges() throws HibernateException {
    errorIfClosed();
    checkTransactionSynchStatus();
    NonFlushedChanges nonFlushedChanges = new NonFlushedChangesImpl( this );
    if ( childSessionsByEntityMode != null ) {
      Iterator it = childSessionsByEntityMode.values().iterator();
      while ( it.hasNext() ) {
        nonFlushedChanges.extractFromSession( ( EventSource ) it.next() );
      }
    }
    return nonFlushedChanges;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.engine.NonFlushedChanges

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.