Package siena.core.options

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 {
        // if stateless and not paginating, resets the realoffset to 0
View Full Code Here


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

      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 with offsets
      if(!gaeCtx.isActive()){
        // cursor not yet created
View Full Code Here

    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

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

      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

            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

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

              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

            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

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.