Examples of AfterLoadAction


Examples of org.hibernate.loader.spi.AfterLoadAction

      if ( lockOptions.getLockMode() != LockMode.UPGRADE_SKIPLOCKED ) {
        LOG.usingFollowOnLocking();
        lockOptions.setTimeOut( parameters.getLockOptions().getTimeOut() );
        lockOptions.setScope( parameters.getLockOptions().getScope() );
        afterLoadActions.add(
            new AfterLoadAction() {
              @Override
              public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
                ( (Session) session ).buildLockRequest( lockOptions ).lock( persister.getEntityName(), entity );
              }
            }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

        final LockOptions lockOptionsToUse = new LockOptions( lockMode );
        lockOptionsToUse.setTimeOut( lockOptions.getTimeOut() );
        lockOptionsToUse.setScope( lockOptions.getScope() );

        afterLoadActions.add(
            new AfterLoadAction() {
                @Override
                public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
                  ( (Session) session ).buildLockRequest( lockOptionsToUse )
                    .lock( persister.getEntityName(), entity );
                }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

    // user is request locking, lets see if we can apply locking directly to the SQL...

    //     some dialects wont allow locking with paging...
    afterLoadActions.add(
        new AfterLoadAction() {
          private final LockOptions originalLockOptions = lockOptions.makeCopy();
          @Override
          public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
            ( (Session) session ).buildLockRequest( originalLockOptions ).lock( persister.getEntityName(), entity );
          }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

      if ( lockOptions.getLockMode() != LockMode.UPGRADE_SKIPLOCKED ) {
        LOG.usingFollowOnLocking();
        lockOptions.setTimeOut( parameters.getLockOptions().getTimeOut() );
        lockOptions.setScope( parameters.getLockOptions().getScope() );
        afterLoadActions.add(
            new AfterLoadAction() {
              @Override
              public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
                ( (Session) session ).buildLockRequest( lockOptions ).lock( persister.getEntityName(), entity );
              }
            }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

    // user is request locking, lets see if we can apply locking directly to the SQL...

    //     some dialects wont allow locking with paging...
    afterLoadActions.add(
        new AfterLoadAction() {
          private final LockOptions originalLockOptions = lockOptions.makeCopy();
          @Override
          public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
            ( (Session) session ).buildLockRequest( originalLockOptions ).lock( persister.getEntityName(), entity );
          }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

      if ( lockOptions.getLockMode() != LockMode.UPGRADE_SKIPLOCKED ) {
        LOG.usingFollowOnLocking();
        lockOptions.setTimeOut( parameters.getLockOptions().getTimeOut() );
        lockOptions.setScope( parameters.getLockOptions().getScope() );
        afterLoadActions.add(
            new AfterLoadAction() {
              @Override
              public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
                ( (Session) session ).buildLockRequest( lockOptions ).lock( persister.getEntityName(), entity );
              }
            }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

        final LockOptions lockOptionsToUse = new LockOptions( lockMode );
        lockOptionsToUse.setTimeOut( lockOptions.getTimeOut() );
        lockOptionsToUse.setScope( lockOptions.getScope() );

        afterLoadActions.add(
            new AfterLoadAction() {
                @Override
                public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
                  ( (Session) session ).buildLockRequest( lockOptionsToUse )
                    .lock( persister.getEntityName(), entity );
                }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

      if ( lockOptions.getLockMode() != LockMode.UPGRADE_SKIPLOCKED ) {
        LOG.usingFollowOnLocking();
        lockOptions.setTimeOut( parameters.getLockOptions().getTimeOut() );
        lockOptions.setScope( parameters.getLockOptions().getScope() );
        afterLoadActions.add(
            new AfterLoadAction() {
              @Override
              public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
                ( (Session) session ).buildLockRequest( lockOptions ).lock( persister.getEntityName(), entity );
              }
            }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

    // user is request locking, lets see if we can apply locking directly to the SQL...

    //     some dialects wont allow locking with paging...
    afterLoadActions.add(
        new AfterLoadAction() {
          private final LockOptions originalLockOptions = lockOptions.makeCopy();
          @Override
          public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
            ( (Session) session ).buildLockRequest( originalLockOptions ).lock( persister.getEntityName(), entity );
          }
View Full Code Here

Examples of org.hibernate.loader.spi.AfterLoadAction

    // user is request locking, lets see if we can apply locking directly to the SQL...

    //     some dialects wont allow locking with paging...
    afterLoadActions.add(
        new AfterLoadAction() {
          private final LockOptions originalLockOptions = lockOptions.makeCopy();
          @Override
          public void afterLoad(SessionImplementor session, Object entity, Loadable persister) {
            ( (Session) session ).buildLockRequest( originalLockOptions ).lock( persister.getEntityName(), entity );
          }
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.