@@ -0,0 +1,479 @@
+package com.pollistics.services;%0A%0Aimport java.util.List;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Service;%0A%0Aimport com.pollistics.models.Poll;%0Aimport com.pollistics.repositories.PollRepository;%0A%0A@Service%0Apublic class PollService %7B%0A%09@Autowired%0A%09private PollRepository pollRepo;%0A%09%0A%09public Poll getPoll(String id) %7B%0A%09%09return pollRepo.findOne(id);%0A%09%7D%0A%09%0A%09public List%3CPoll%3E getAllPolls() %7B%0A%09%09return pollRepo.findAll();%0A%09%7D%0A%7D%0A

Use services to abstract database