예제 #1
0
  private ShoppingOrder _get(String orderId) {
    if (!_cacheable) {
      return null;
    } else if (orderId == null) {
      return null;
    } else {
      ShoppingOrder obj = null;
      String key = orderId.toString();

      if (Validator.isNull(key)) {
        return null;
      }

      try {
        obj = (ShoppingOrder) _cache.getFromCache(key);
      } catch (NeedsRefreshException nfe) {
      } finally {
        if (obj == null) {
          _cache.cancelUpdate(key);
        }
      }

      return obj;
    }
  }
예제 #2
0
  private PollsQuestion _get(String questionId) {
    if (!_cacheable) {
      return null;
    } else if (questionId == null) {
      return null;
    } else {
      PollsQuestion obj = null;
      String key = questionId.toString();

      if (Validator.isNull(key)) {
        return null;
      }
      try {
        obj = (PollsQuestion) _cache.get(key, primaryGroup);
      } catch (DotCacheException e) {
        Logger.debug(this, "Cache Entry not found", e);
      }
      return obj;
    }
  }