use of teammates.storage.entity.FeedbackResponse in project teammates by TEAMMATES.
the class FeedbackResponsesDb method getFeedbackResponseEntitiesFromGiverForQuestionInSection.
private Collection<FeedbackResponse> getFeedbackResponseEntitiesFromGiverForQuestionInSection(String feedbackQuestionId, String giverEmail, String section) {
Map<String, FeedbackResponse> feedbackResponses = new HashMap<>();
List<FeedbackResponse> firstQueryResponses = load().filter("feedbackQuestionId =", feedbackQuestionId).filter("giverEmail =", giverEmail).filter("giverSection =", section).list();
for (FeedbackResponse response : firstQueryResponses) {
feedbackResponses.put(response.getId(), response);
}
List<FeedbackResponse> secondQueryResponses = load().filter("feedbackQuestionId =", feedbackQuestionId).filter("giverEmail =", giverEmail).filter("receiverSection =", section).list();
for (FeedbackResponse response : secondQueryResponses) {
feedbackResponses.put(response.getId(), response);
}
return feedbackResponses.values();
}
Aggregations