Package com.jfinal.plugin.activerecord.cache

Examples of com.jfinal.plugin.activerecord.cache.ICache


   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return the list of Model
   */
  public List<M> findByCache(String cacheName, Object key, String sql, Object... paras) {
    ICache cache = DbKit.getCache();
    List<M> result = cache.get(cacheName, key);
    if (result == null) {
      result = find(sql, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here


   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return Page
   */
  public Page<M> paginateByCache(String cacheName, Object key, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) {
    ICache cache = DbKit.getCache();
    Page<M> result = cache.get(cacheName, key);
    if (result == null) {
      result = paginate(pageNumber, pageSize, select, sqlExceptSelect, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return the list of Record
   */
  public static List<Record> findByCache(String cacheName, Object key, String sql, Object... paras) {
    ICache cache = DbKit.getCache();
    List<Record> result = cache.get(cacheName, key);
    if (result == null) {
      result = find(sql, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * Paginate by cache.
   * @see #paginate(int, int, String, String, Object...)
   * @return Page
   */
  public static Page<Record> paginateByCache(String cacheName, Object key, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) {
    ICache cache = DbKit.getCache();
    Page<Record> result = cache.get(cacheName, key);
    if (result == null) {
      result = paginate(pageNumber, pageSize, select, sqlExceptSelect, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return the list of Record
   */
  public List<Record> findByCache(String cacheName, Object key, String sql, Object... paras) {
    ICache cache = config.getCache();
    List<Record> result = cache.get(cacheName, key);
    if (result == null) {
      result = find(sql, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * Paginate by cache.
   * @see #paginate(int, int, String, String, Object...)
   * @return Page
   */
  public Page<Record> paginateByCache(String cacheName, Object key, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) {
    ICache cache = config.getCache();
    Page<Record> result = cache.get(cacheName, key);
    if (result == null) {
      result = paginate(pageNumber, pageSize, select, sqlExceptSelect, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return the list of Model
   */
  public List<M> findByCache(String cacheName, Object key, String sql, Object... paras) {
    ICache cache = getConfig().getCache();
    List<M> result = cache.get(cacheName, key);
    if (result == null) {
      result = find(sql, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return Page
   */
  public Page<M> paginateByCache(String cacheName, Object key, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) {
    ICache cache = getConfig().getCache();
    Page<M> result = cache.get(cacheName, key);
    if (result == null) {
      result = paginate(pageNumber, pageSize, select, sqlExceptSelect, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return the list of Model
   */
  public List<M> findByCache(String cacheName, Object key, String sql, Object... paras) {
    ICache cache = getConfig().getCache();
    List<M> result = cache.get(cacheName, key);
    if (result == null) {
      result = find(sql, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

   * @param cacheName the cache name
   * @param key the key used to get date from cache
   * @return Page
   */
  public Page<M> paginateByCache(String cacheName, Object key, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) {
    ICache cache = getConfig().getCache();
    Page<M> result = cache.get(cacheName, key);
    if (result == null) {
      result = paginate(pageNumber, pageSize, select, sqlExceptSelect, paras);
      cache.put(cacheName, key, result);
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of com.jfinal.plugin.activerecord.cache.ICache

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.