Exemplo n.º 1
0
 /**
  * retrieve all answers corresponding to the given poll
  *
  * @param poll a Poll
  * @return a Collection of Answer
  */
 public static List<Answer> findAnswersOfPoll(Poll poll) {
   return Answer.find("poll = ? and selected = ?", poll, Boolean.TRUE).fetch();
 }
Exemplo n.º 2
0
 /**
  * Gets the answers.
  *
  * @return the answers
  */
 public List<Entry> getAnswers() {
   return Answer.find("owner like ? order by timestamp desc", this).fetch();
 }