- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 53 of file Poll.java.
◆ canVote()
boolean org.turro.elephant.entities.db.Poll.canVote |
( |
| ) |
|
◆ compareTo()
int org.turro.elephant.entities.db.Poll.compareTo |
( |
Poll |
o | ) |
|
Definition at line 316 of file Poll.java.
317 int result = CompareUtil.compare(o.deadline, deadline);
319 CompareUtil.compare(o.id,
id);
◆ entityId()
Object org.turro.elephant.entities.db.Poll.entityId |
( |
| ) |
|
◆ equals()
boolean org.turro.elephant.entities.db.Poll.equals |
( |
Object |
obj | ) |
|
Definition at line 298 of file Poll.java.
305 if (getClass() != obj.getClass()) {
308 final Poll other = (Poll) obj;
309 if (!Objects.equals(
this.id, other.id)) {
◆ getDeadline()
Date org.turro.elephant.entities.db.Poll.getDeadline |
( |
| ) |
|
◆ getEntity()
Definition at line 222 of file Poll.java.
223 return Entities.getController(entityPath);
◆ getEntityPath()
String org.turro.elephant.entities.db.Poll.getEntityPath |
( |
| ) |
|
◆ getId()
Long org.turro.elephant.entities.db.Poll.getId |
( |
| ) |
|
◆ getLocation()
String org.turro.elephant.entities.db.Poll.getLocation |
( |
| ) |
|
◆ getMaxPerOption()
int org.turro.elephant.entities.db.Poll.getMaxPerOption |
( |
| ) |
|
◆ getMaxVotedOptions()
int org.turro.elephant.entities.db.Poll.getMaxVotedOptions |
( |
| ) |
|
Definition at line 140 of file Poll.java.
141 return maxVotedOptions;
◆ getOptionClass()
String org.turro.elephant.entities.db.Poll.getOptionClass |
( |
| ) |
|
◆ getOptionEnd()
String org.turro.elephant.entities.db.Poll.getOptionEnd |
( |
| ) |
|
◆ getOptions()
List<PollOption> org.turro.elephant.entities.db.Poll.getOptions |
( |
| ) |
|
Definition at line 226 of file Poll.java.
227 WhereClause wc =
new WhereClause();
228 wc.addClause(
"select opt from PollOption opt");
229 wc.addClause(
"where opt.idPoll = :idPoll");
230 wc.addNamedValue(
"idPoll", this.
getId());
231 wc.addClause(
"order by opt.ordering, opt.pollData");
232 return new ElephantPU().getResultList(wc);
◆ getOptionStart()
String org.turro.elephant.entities.db.Poll.getOptionStart |
( |
| ) |
|
◆ getParticipants()
AssistantSet org.turro.elephant.entities.db.Poll.getParticipants |
( |
| ) |
|
Definition at line 259 of file Poll.java.
260 if(assistantSet ==
null) {
261 assistantSet =
new AssistantSet();
262 Assistants.addAssistants(entityPath,
true, assistantSet, AssistantConstants.all());
◆ getText()
String org.turro.elephant.entities.db.Poll.getText |
( |
| ) |
|
Definition at line 124 of file Poll.java.
125 return text ==
null ? null : text.replaceAll(
"\\{site\\}", ElephantContext.getSiteName());
◆ getTitle()
String org.turro.elephant.entities.db.Poll.getTitle |
( |
| ) |
|
◆ getVotes() [1/2]
List<PollVote> org.turro.elephant.entities.db.Poll.getVotes |
( |
| ) |
|
Definition at line 235 of file Poll.java.
236 WhereClause wc =
new WhereClause();
237 wc.addClause(
"select vote from PollVote vote");
238 wc.addClause(
"where vote.idPoll = :idPoll");
239 wc.addNamedValue(
"idPoll", this.
getId());
240 wc.addClause(
"order by vote.idPoll, vote.pollData");
241 return new ElephantPU().getResultList(wc);
◆ getVotes() [2/2]
Definition at line 244 of file Poll.java.
245 WhereClause wc =
new WhereClause();
246 wc.addClause(
"select vote from PollVote vote");
247 wc.addClause(
"where vote.idPoll = :idPoll");
248 wc.addNamedValue(
"idPoll", this.
getId());
249 wc.addClause(
"and vote.idContact = :contact");
250 wc.addNamedValue(
"contact", contact.getId());
251 wc.addClause(
"order by vote.idPoll, vote.pollData");
252 return new ElephantPU().getResultList(wc);
◆ getWiki()
String org.turro.elephant.entities.db.Poll.getWiki |
( |
| ) |
|
◆ hashCode()
int org.turro.elephant.entities.db.Poll.hashCode |
( |
| ) |
|
Definition at line 291 of file Poll.java.
293 hash = 17 * hash + Objects.hashCode(this.
id);
◆ isAllowInsertions()
boolean org.turro.elephant.entities.db.Poll.isAllowInsertions |
( |
| ) |
|
Definition at line 164 of file Poll.java.
165 return allowInsertions;
◆ isAllowNegatives()
boolean org.turro.elephant.entities.db.Poll.isAllowNegatives |
( |
| ) |
|
Definition at line 172 of file Poll.java.
173 return allowNegatives;
◆ isEmpty()
boolean org.turro.elephant.entities.db.Poll.isEmpty |
( |
| ) |
|
◆ isFullyVoted() [1/2]
boolean org.turro.elephant.entities.db.Poll.isFullyVoted |
( |
| ) |
|
◆ isFullyVoted() [2/2]
boolean org.turro.elephant.entities.db.Poll.isFullyVoted |
( |
IContact |
contact | ) |
|
Definition at line 279 of file Poll.java.
281 if(po.getPollVote(contact) ==
null) {
List< PollOption > getOptions()
◆ isParticipant() [1/2]
boolean org.turro.elephant.entities.db.Poll.isParticipant |
( |
| ) |
|
◆ isParticipant() [2/2]
boolean org.turro.elephant.entities.db.Poll.isParticipant |
( |
IContact |
contact | ) |
|
Definition at line 271 of file Poll.java.
boolean exists(IContact contact)
AssistantSet getParticipants()
◆ isShowParticipants()
boolean org.turro.elephant.entities.db.Poll.isShowParticipants |
( |
| ) |
|
Definition at line 148 of file Poll.java.
149 return showParticipants;
◆ isShowVotes()
boolean org.turro.elephant.entities.db.Poll.isShowVotes |
( |
| ) |
|
◆ setAllowInsertions()
void org.turro.elephant.entities.db.Poll.setAllowInsertions |
( |
boolean |
allowInsertions | ) |
|
Definition at line 168 of file Poll.java.
169 this.allowInsertions = allowInsertions;
◆ setAllowNegatives()
void org.turro.elephant.entities.db.Poll.setAllowNegatives |
( |
boolean |
allowNegatives | ) |
|
Definition at line 176 of file Poll.java.
177 this.allowNegatives = allowNegatives;
◆ setDeadline()
void org.turro.elephant.entities.db.Poll.setDeadline |
( |
Date |
deadline | ) |
|
Definition at line 111 of file Poll.java.
112 this.deadline = deadline;
◆ setEntityPath()
void org.turro.elephant.entities.db.Poll.setEntityPath |
( |
String |
entityPath | ) |
|
Definition at line 103 of file Poll.java.
104 this.entityPath = entityPath;
◆ setId()
void org.turro.elephant.entities.db.Poll.setId |
( |
Long |
id | ) |
|
◆ setLocation()
void org.turro.elephant.entities.db.Poll.setLocation |
( |
String |
location | ) |
|
Definition at line 95 of file Poll.java.
96 this.location = location;
◆ setMaxPerOption()
void org.turro.elephant.entities.db.Poll.setMaxPerOption |
( |
int |
maxPerOption | ) |
|
Definition at line 136 of file Poll.java.
137 this.maxPerOption = maxPerOption;
◆ setMaxVotedOptions()
void org.turro.elephant.entities.db.Poll.setMaxVotedOptions |
( |
int |
maxVotedOptions | ) |
|
Definition at line 144 of file Poll.java.
145 this.maxVotedOptions = maxVotedOptions;
◆ setOptionClass()
void org.turro.elephant.entities.db.Poll.setOptionClass |
( |
String |
optionClass | ) |
|
Definition at line 184 of file Poll.java.
185 this.optionClass = optionClass;
◆ setOptionEnd()
void org.turro.elephant.entities.db.Poll.setOptionEnd |
( |
String |
optionEnd | ) |
|
Definition at line 200 of file Poll.java.
201 this.optionEnd = optionEnd;
◆ setOptionStart()
void org.turro.elephant.entities.db.Poll.setOptionStart |
( |
String |
optionStart | ) |
|
Definition at line 192 of file Poll.java.
193 this.optionStart = optionStart;
◆ setShowParticipants()
void org.turro.elephant.entities.db.Poll.setShowParticipants |
( |
boolean |
showParticipants | ) |
|
Definition at line 152 of file Poll.java.
153 this.showParticipants = showParticipants;
◆ setShowVotes()
void org.turro.elephant.entities.db.Poll.setShowVotes |
( |
boolean |
showVotes | ) |
|
Definition at line 160 of file Poll.java.
161 this.showVotes = showVotes;
◆ setText()
void org.turro.elephant.entities.db.Poll.setText |
( |
String |
text | ) |
|
◆ setTitle()
void org.turro.elephant.entities.db.Poll.setTitle |
( |
String |
title | ) |
|
◆ setWiki()
void org.turro.elephant.entities.db.Poll.setWiki |
( |
String |
wiki | ) |
|
Definition at line 119 of file Poll.java.
121 text = WikiCompiler.source(wiki).html();
The documentation for this class was generated from the following file: