/* * Gets a specific category tuple from the database as specified by the * categories ID. */ public RESTCategoryV1 getCategoryById(final int id) { try { if (entityCache.containsKeyValue(RESTCategoryV1.class, id)) { return entityCache.get(RESTCategoryV1.class, id); } else { final RESTCategoryV1 category = client.getJSONCategory(id, null); entityCache.add(category); return category; } } catch (Exception e) { log.debug(e.getMessage()); e.printStackTrace(); } return null; }