Package org.hibernate.action

Examples of org.hibernate.action.EntityVerifyVersionProcess


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


    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 );
    }

    if ( event.getPersister().implementsLifecycle( event.getSession().getEntityMode() ) ) {
      //log.debug( "calling onLoad()" );
View Full Code Here

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

    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 );
    }

    if ( event.getPersister().implementsLifecycle( event.getSession().getEntityMode() ) ) {
      //log.debug( "calling onLoad()" );
View Full Code Here

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

TOP

Related Classes of org.hibernate.action.EntityVerifyVersionProcess

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.