Package org.hibernate.loader.spi

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


        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

    // 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

      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

    // 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

      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

        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

      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

    // 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

    // 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

Related Classes of org.hibernate.loader.spi.AfterLoadAction

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.