Package siena.core.options

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


          else sdbCtx.realOffset += pag.pageSize;
         
          // if currentokenoffset is less than next page realoffset
          // uses offset
          if(sdbCtx.currentTokenOffset() <= sdbCtx.realOffset){
            off.activate();
            off.offset = sdbCtx.realOffset - sdbCtx.currentTokenOffset();
          }
          // if currentokenoffset is greater than previous page realoffset
          // go to previous page again
          else {
View Full Code Here


          }         
        }
      }else {
        // no token yet, so uses the offset to go to next page
        QueryOptionOffset offset = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
        offset.activate();
        offset.offset += pag.pageSize;
        // follows the real offset
        sdbCtx.realOffset += pag.pageSize;
      }
    }else {
View Full Code Here

         
          // if currentokenoffset is less than previous page realoffset
          // uses offset
          if(sdbCtx.currentTokenOffset() <= sdbCtx.realOffset){
            QueryOptionOffset offset = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
            offset.activate();
            offset.offset = sdbCtx.realOffset - sdbCtx.currentTokenOffset();
          }
          // if currentokenoffset is greater than previous page realoffset
          // go to previous page again
          else {
View Full Code Here

           
            // if the realOffset is not null, it means we are not at the index 0 of the table
            // so now uses realOffset
            if(sdbCtx.realOffset >= 0){
              QueryOptionOffset offset = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
              offset.activate();
              offset.offset = sdbCtx.realOffset;
            }else {
              // resets realOffset to 0 because it was negative
              sdbCtx.realOffset = 0;
              sdbCtx.noMoreDataBefore = true;
View Full Code Here

           
            // if currentokenoffset is less than previous page realoffset
            // uses offset
            if(sdbCtx.currentTokenOffset() <= sdbCtx.realOffset){
              QueryOptionOffset offset = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
              offset.activate();
              offset.offset = sdbCtx.realOffset - sdbCtx.currentTokenOffset();
            }
            // if currentokenoffset is greater than previous page realoffset
            // go to previous page again
            else {
View Full Code Here

        // to simulate the nextPage as there was no token yet
        if(sdbCtx.realOffset != 0){
          // follows the real offset
          sdbCtx.realOffset -= pag.pageSize;         

          offset.activate();         
          offset.offset = sdbCtx.realOffset;
        }else {
          sdbCtx.noMoreDataBefore = true;
        }
        /*if(offset.offset != 0){
View Full Code Here

    }

    QueryOptionOffset off = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
    // if local offset has been set, uses it
    if(offset!=0){
      off.activate();
      off.offset = offset;
    }
           
    // if previousPage has detected there is no more data, simply returns an empty list
    if(gaeCtx.noMoreDataBefore){
View Full Code Here

    }

    QueryOptionOffset off = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
    // if local offset has been set, uses it
    if(offset!=0){
      off.activate();
      off.offset = offset;
    }
   
    // if previousPage has detected there is no more data, simply returns an empty list
    if(gaeCtx.noMoreDataBefore){
View Full Code Here

          // desactivates offset because we don't to go on using offset while going to next tokens
          boolean b = off.isActive();
          off.passivate();
          doFetchList(query, Integer.MAX_VALUE, 0, results, depth+1);
          // reactivate it if it was activated
          if(b) off.activate();
        }
      }
    }
  }
 
View Full Code Here

      sdbCtx.realPageSize = pag.pageSize;
    }
   
    // if local offset has been set, uses it
    if(offset!=0){
      off.activate();
      off.offset = offset;
    }
  }
 
 
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.