Package se.rupy.sprout.Sprout

Examples of se.rupy.sprout.Sprout.Cache


    return old;
  }

  public static Cache get(String type, int start, int limit) throws SQLException {
    String key = type + "|" + start + "|" + limit;
    Cache old = (Cache) cache2.get(key);

    if(old == null) {
      old = new Cache(true);
    }

    if(old.invalid) {
      old = new Cache(false);
      old.setType(ARTICLE | USER);
      old.setParent(-1);
      old.setStart(start);
      old.setLimit(limit);
      Sprout.update(Base.SELECT, old);

      int index = 0;
      Iterator it = old.iterator();

      while(it.hasNext()) {
        NodeBean node = (NodeBean) it.next();
        Article article = new Article();

        article.copy(node);
        article.fill(10, 0, 100);

        cache1.put(new Long(article.getId()), article);

        article.count();

        //Node user = (Node) article.child(USER).getFirst();
        //user.meta();

        old.set(index++, article);
      }

      cache2.put(key, old);
    }
View Full Code Here

TOP

Related Classes of se.rupy.sprout.Sprout.Cache

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.