Package org.hibernate.action

Examples of org.hibernate.action.EntityIncrementVersionProcess


          entry.getId(), entry.getVersion(), event.getSession()
      );
      entry.forceLocked( entity, nextVersion );
    }
    else if ( LockMode.OPTIMISTIC_FORCE_INCREMENT.equals( lockMode ) ) {
      EntityIncrementVersionProcess incrementVersion = new EntityIncrementVersionProcess( entity, entry );
      event.getSession().getActionQueue().registerProcess( incrementVersion );
    }
    else if ( LockMode.OPTIMISTIC.equals( lockMode ) ) {
      EntityVerifyVersionProcess verifyVersion = new EntityVerifyVersionProcess( entity, entry );
      event.getSession().getActionQueue().registerProcess( verifyVersion );
View Full Code Here


      int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException {
    if ( !lockable.isVersioned() ) {
      throw new HibernateException( "[" + lockMode + "] not supported for non-versioned entities [" + lockable.getEntityName() + "]" );
    }
    EntityEntry entry = session.getPersistenceContext().getEntry( object );
    EntityIncrementVersionProcess incrementVersion = new EntityIncrementVersionProcess( object, entry );
    EventSource source = (EventSource) session;
    // Register the EntityIncrementVersionProcess action to run just prior to transaction commit.
    source.getActionQueue().registerProcess( incrementVersion );
  }
View Full Code Here

      int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException {
    if ( !lockable.isVersioned() ) {
      throw new HibernateException( "[" + lockMode + "] not supported for non-versioned entities [" + lockable.getEntityName() + "]" );
    }
      EntityEntry entry = session.getPersistenceContext().getEntry(object);
    EntityIncrementVersionProcess incrementVersion = new EntityIncrementVersionProcess(object, entry);
    EventSource source = (EventSource)session;
    // Register the EntityIncrementVersionProcess action to run just prior to transaction commit.
    source.getActionQueue().registerProcess(incrementVersion);
  }
View Full Code Here

          entry.getId(), entry.getVersion(), event.getSession()
      );
      entry.forceLocked( entity, nextVersion );
    }
    else if ( LockMode.OPTIMISTIC_FORCE_INCREMENT.equals( lockMode ) ) {
      EntityIncrementVersionProcess incrementVersion = new EntityIncrementVersionProcess( entity, entry );
      event.getSession().getActionQueue().registerProcess( incrementVersion );
    }
    else if ( LockMode.OPTIMISTIC.equals( lockMode ) ) {
      EntityVerifyVersionProcess verifyVersion = new EntityVerifyVersionProcess( entity, entry );
      event.getSession().getActionQueue().registerProcess( verifyVersion );
View Full Code Here

      int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException {
    if ( !lockable.isVersioned() ) {
      throw new HibernateException( "[" + lockMode + "] not supported for non-versioned entities [" + lockable.getEntityName() + "]" );
    }
    EntityEntry entry = session.getPersistenceContext().getEntry( object );
    EntityIncrementVersionProcess incrementVersion = new EntityIncrementVersionProcess( object, entry );
    EventSource source = (EventSource) session;
    // Register the EntityIncrementVersionProcess action to run just prior to transaction commit.
    source.getActionQueue().registerProcess( incrementVersion );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.action.EntityIncrementVersionProcess

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.