class FeedServiceImpl implements IFeedService {

  @Override
  public List<Feed> getRecordsByProperties(Map<String, Object> properties) {
    ProjectLogger.log(
        "FeedServiceImpl:getRecordsByProperties method called : ", LoggerEnum.INFO.name());
    Response dbResponse =
        getCassandraInstance()
            .getRecordsByProperties(
                usrFeedDbInfo.getKeySpace(), usrFeedDbInfo.getTableName(), properties);
    List<Map<String, Object>> responseList = null;
    List<Feed> feedList = new ArrayList<>();
    if (null != dbResponse && null != dbResponse.getResult()) {
      responseList = (List<Map<String, Object>>) dbResponse.getResult().get(JsonKey.RESPONSE);
      if (CollectionUtils.isNotEmpty(responseList)) {
        responseList.forEach(
            s -> {
              try {
                String data = (String) s.get(JsonKey.FEED_DATA);
                if (StringUtils.isNotBlank(data)) {
                  s.put(
                      JsonKey.FEED_DATA,
                      mapper.readValue(data, new TypeReference<Map<String, Object>>() {}));
                } else {
                  s.put(JsonKey.FEED_DATA, Collections.emptyMap());
                }
                feedList.add(mapper.convertValue(s, Feed.class));
              } catch (Exception ex) {
                ProjectLogger.log(
                    "FeedServiceImpl:getRecordsByProperties :Exception occurred while mapping feed data.",
                    ex);
              }
            });
      }
    }
    return feedList;
  }

}