@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);
 }