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()

      pag.pageSize = 0;
      sdbCtx.resetAll();
    }
    // offset if not kept as it is never reused as is even in stateful
    // mode. the stateful mode only keeps the realOffset/pagination alive
    off.passivate();
    off.offset = 0;
  }
 
  protected <T> void continueFetchNextToken(Query<T> query, List<T> results, int depth){
    QueryOptionPage pag = (QueryOptionPage)query.option(QueryOptionPage.ID);
View Full Code Here

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

    QueryOptionState state = (QueryOptionState)query.option(QueryOptionState.ID);
    QueryOptionOffset off = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
   
    // desactivates offset not to use if fetching more items from next token
    if(state.isStateless()){
      off.passivate();
    }
   
    if(!pag.isActive()){
      if(state.isStateless()){
        // retrieves next token
View Full Code Here

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

        }
      }else {
        if(sdbCtx.currentToken()!=null){
          // 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

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

    if(state.isStateless()){
      sdbCtx.resetAll();     
    }
   
    QueryOptionOffset off = (QueryOptionOffset)query.option(QueryOptionOffset.ID);
    off.passivate();
    off.offset = 0;
  }
 
  @Override
  public <T> PersistenceManagerAsync async() {
View Full Code Here

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

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

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

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