@Override protected ContentEntity dataToEntity(Content content) { ContentEntity entity = new ContentEntity(); entity.setId(Integer.parseInt(content.get("id"))); entity.setContent(content); return entity; }
public Map<String, Content> retrieveAllMap() { List<Content> contentList = retrieveAll(); Map<String, Content> result = new HashMap<>(); for (Content content : contentList) { result.put(content.get("id"), content); } return result; }