19 package org.turro.elephant.entities.db;
21 import java.util.List;
22 import javax.persistence.Entity;
23 import javax.persistence.Id;
24 import javax.persistence.IdClass;
25 import org.turro.string.Strings;
26 import org.turro.elephant.db.ElephantPU;
27 import org.turro.elephant.db.WhereClause;
28 import org.turro.plugin.contacts.IContact;
35 @IdClass(PollOptionPK.class)
36 public class
PollOption implements java.io.Serializable {
42 private String pollData;
44 private String description;
48 private boolean actionButton;
63 this.pollData = pollData;
71 this.description = description;
79 this.ordering = ordering;
87 this.actionButton = actionButton;
93 return Strings.isBlank(pollData);
102 wc.
addClause(
"select vote from PollVote vote");
103 wc.
addClause(
"where vote.idPoll = :idPoll");
105 wc.
addClause(
"and vote.pollData = :pollData");
void addClause(String clause)
void addNamedValue(String name, Object value)
List< PollVote > getVotes()
void setOrdering(int ordering)
void setIdPoll(Long idPoll)
void setPollData(String pollData)
void setActionButton(boolean actionButton)
void setDescription(String description)
PollVote getPollVote(IContact contact)
void setIdPoll(Long idPoll)
void setPollData(String pollData)
void setIdContact(String idContact)