@Override
  public Comment getCommentById(String id) {
    if (id == null) {
      throw new IllegalArgumentException("Comment id is null.");
    }

    commentCache = provider.getCacheContainer().getCache("commentcache");
    if (commentCache.containsKey(id)) {
      return (Comment) commentCache.get(id);
    } else {
      return null;
    }
  }
Пример #2
0
 public String showCarDetails(String numberPlate) {
   carCache = provider.getCacheContainer().getCache(CACHE_NAME);
   this.car = (Car) carCache.get(encode(numberPlate));
   return "showdetails";
 }
Пример #3
0
 @SuppressWarnings("unchecked")
 private List<String> getNumberPlateList() {
   return (List<String>) carCache.get(CAR_NUMBERS_KEY);
 }