Examples of passivate()


Examples of siena.core.options.QueryOptionOffset.passivate()

    if(state.isStateless()) {
      if(pag.isPaginating()){     
        if(off.isActive()){
          gaeCtx.realOffset+=off.offset;
          fetchOptions.offset(gaeCtx.realOffset);
          off.passivate();
        }else {
          fetchOptions.offset(gaeCtx.realOffset);
        }
      }else {
               
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

               
        // if stateless and not paginating, resets the realoffset to 0
        gaeCtx.realOffset = off.offset;
        if(off.isActive()){
          fetchOptions.offset(gaeCtx.realOffset);
          off.passivate();
        }
      }
     
      switch(fetchType.fetchType){
      case ITER:
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

      if(off.isActive()){
        // by default, we add the offset but it can be added with the realoffset
        // in case of cursor desactivated
        fetchOptions.offset(off.offset);
        gaeCtx.realOffset+=off.offset;
        off.passivate();
      }
      // manages cursor limitations for IN and != operators   
      if(!gaeCtx.isActive()){
        // cursor not yet created
        switch(fetchType.fetchType){
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

            gaeCtx.realOffset+=pag.pageSize;
            //}
          }
          // if the cursor is used, just passivates the offset
          else {
            offset.passivate();
            // keeps track of the offset anyway
            gaeCtx.realOffset+=pag.pageSize;
          }
        }else {
          QueryOptionOffset offset = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

            // if the cursor is null, it means we are back to the first page so we reactivate the offset
            gaeCtx.realOffset+=pag.pageSize;
            if(cursor==null){
              offset.activate();
            }else {
              offset.passivate();
            }
          }
        }
      }
    }else {
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

              if(gaeCtx.realOffset>=pag.pageSize) {
                gaeCtx.realOffset-=pag.pageSize;
              }
              // passivates offset and computes the page before because we are at the first page
              else{
                offset.passivate();
                gaeCtx.noMoreDataBefore = true;               
                previousPage(query);
              }
            //}
          }else{
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

            if(cursor==null){
              offset.activate();
              gaeCtx.useCursor = false;
              previousPage(query);
            }else {
              offset.passivate();
              gaeCtx.useCursor = true;
              if(gaeCtx.realOffset>=pag.pageSize) {
                gaeCtx.realOffset-=pag.pageSize;
              }
              // passivates offset and computes the page before because we are at the first page
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

        || (state.isStateful() && jdbcCtx.isActive() && jdbcCtx.isClosed())) {
      if(state.isStateless()){
        if(pag.isPaginating()){
          if(offsetOpt.isActive()){
            jdbcCtx.realOffset+=offsetOpt.offset;
            offsetOpt.passivate();
          }else {
            // keeps realOffset
          }
        }else {
          // if page is active, immediately passivates it not to keep is active
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

          if(pag.isActive()) {
            pag.passivate();
          }
          if(offsetOpt.isActive()){
            jdbcCtx.realOffset=offsetOpt.offset;
            offsetOpt.passivate();
          }else{
            jdbcCtx.realOffset = 0;
          }
        }
      } else {
View Full Code Here

Examples of siena.core.options.QueryOptionOffset.passivate()

          }
        }
      } else {
        if(offsetOpt.isActive()){
          jdbcCtx.realOffset+=offsetOpt.offset;
          offsetOpt.passivate();
        }else {
          // keeps realOffset
        }
      }
      Class<T> clazz = query.getQueriedClass();
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.