@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; } }
public String showCarDetails(String numberPlate) { carCache = provider.getCacheContainer().getCache(CACHE_NAME); this.car = (Car) carCache.get(encode(numberPlate)); return "showdetails"; }
@SuppressWarnings("unchecked") private List<String> getNumberPlateList() { return (List<String>) carCache.get(CAR_NUMBERS_KEY); }