Author: tchemit Date: 2012-03-06 11:39:17 +0100 (Tue, 06 Mar 2012) New Revision: 3163 Url: http://chorem.org/repositories/revision/pollen/3163 Log: Evolution #480: Change all Boolean field in model to boolean Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java branches/pollen-1.2.6-struts2/pollen-persistence/src/main/xmi/pollen.properties branches/pollen-1.2.6-struts2/pollen-persistence/src/main/xmi/pollen.zargo branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollResultsService.java branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -70,7 +70,7 @@ choiceDTO.setHidden(eChoiceName != null && eChoiceName.startsWith(NumberMethod.HIDDEN_PREFIX)); choiceDTO.setDescription(eChoice.getDescription()); - choiceDTO.setValidate(eChoice.getValidate()); + choiceDTO.setValidate(eChoice.isValidate()); if (eChoice.getPoll() != null) { choiceDTO.setPollId(eChoice.getPoll().getTopiaId()); Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -133,7 +133,7 @@ //VotingListDTO votingListDTO = votingListConverter.createVotingListDTO(personToList.getVotingList()); dto.setWeight(personToList.getWeight()); - dto.setHasVoted(personToList.getHasVoted()); + dto.setHasVoted(personToList.isHasVoted()); //dto.setVotingListId(votingListDTO.getId()); } } Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -102,11 +102,11 @@ pollDTO.setBeginDate(ePoll.getBeginDate()); pollDTO.setEndDate(ePoll.getEndDate()); pollDTO.setAnonymous(ePoll.getAnonymous()); - pollDTO.setAnonymousVoteAllowed(ePoll.getAnonymousVoteAllowed()); - pollDTO.setPublicResults(ePoll.getPublicResults()); - pollDTO.setContinuousResults(ePoll.getContinuousResults()); - pollDTO.setChoiceAddAllowed(ePoll.getChoiceAddAllowed()); - pollDTO.setClosed(ePoll.getClosed()); + pollDTO.setAnonymousVoteAllowed(ePoll.isAnonymousVoteAllowed()); + pollDTO.setPublicResults(ePoll.isPublicResults()); + pollDTO.setContinuousResults(ePoll.isContinuousResults()); + pollDTO.setChoiceAddAllowed(ePoll.isChoiceAddAllowed()); + pollDTO.setClosed(ePoll.isClosed()); pollDTO.setMaxChoiceNb(ePoll.getMaxChoiceNb()); pollDTO.setChoiceType(EnumController.getChoiceType(ePoll)); pollDTO.setPollType(EnumController.getPollType(ePoll)); Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -70,9 +70,9 @@ preventRuleDTO.setId(preventRule.getTopiaId()); preventRuleDTO.setScope(preventRule.getScope()); preventRuleDTO.setSensibility(preventRule.getSensibility()); - preventRuleDTO.setActive(preventRule.getActive()); - preventRuleDTO.setOneTime(preventRule.getOneTime()); - preventRuleDTO.setRepeated(preventRule.getRepeated()); + preventRuleDTO.setActive(preventRule.isActive()); + preventRuleDTO.setOneTime(preventRule.isOneTime()); + preventRuleDTO.setRepeated(preventRule.isRepeated()); preventRuleDTO.setMethod(preventRule.getMethod()); if (preventRule.getPoll() != null) { Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -93,7 +93,7 @@ dto.setHidden(resName != null && resName.startsWith(NumberMethod.HIDDEN_PREFIX)); dto.setValue(res.getResultValue()); - dto.setByGroup(res.getByGroup()); + dto.setByGroup(res.isByGroup()); dto.setChoiceType(EnumController.getChoiceType(ePoll)); dto.setVoteCounting(EnumController.getVoteCountingType(ePoll)); results.add(dto); Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -58,11 +58,11 @@ pollDTO.setBeginDate(ePoll.getBeginDate()); pollDTO.setEndDate(ePoll.getEndDate()); pollDTO.setAnonymous(ePoll.getAnonymous()); - pollDTO.setAnonymousVoteAllowed(ePoll.getAnonymousVoteAllowed()); - pollDTO.setPublicResults(ePoll.getPublicResults()); - pollDTO.setContinuousResults(ePoll.getContinuousResults()); - pollDTO.setChoiceAddAllowed(ePoll.getChoiceAddAllowed()); - pollDTO.setClosed(ePoll.getClosed()); + pollDTO.setAnonymousVoteAllowed(ePoll.isAnonymousVoteAllowed()); + pollDTO.setPublicResults(ePoll.isPublicResults()); + pollDTO.setContinuousResults(ePoll.isContinuousResults()); + pollDTO.setChoiceAddAllowed(ePoll.isChoiceAddAllowed()); + pollDTO.setClosed(ePoll.isClosed()); pollDTO.setCreatorId(ePoll.getCreator().getVotingId()); pollDTO.setCreatorEmail(ePoll.getCreator().getEmail()); pollDTO.setMaxChoiceNb(ePoll.getMaxChoiceNb()); Modified: branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -390,7 +390,7 @@ for (VotingList votingList : poll.getVotingList()) { for (PersonToList personToList : votingList .getPollAccountPersonToList()) { - if (!personToList.getHasVoted()) { + if (!personToList.isHasVoted()) { PollAccount pollAccount = personToList .getPollAccount(); if (pollAccount != null Modified: branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -68,9 +68,6 @@ // } else if (dialect instanceof H2Dialect) { // } - // let's use a primitive boolean - queries.add("update useraccount set administrator = false where administrator is null;"); - // change choice type to use enumeration migrateChoiceTypes(tx, queries); @@ -79,9 +76,41 @@ // change vote counting type to use enumeration migrateVoteCountingTypes(tx, queries); + + // change all Boolean properties to boolean + migrateBoolean(tx, queries); } + private void migrateBoolean(TopiaContextImplementor tx, + List<String> queries) throws TopiaException { + migrateBoolean(queries, "useraccount", "administrator"); + migrateBoolean(queries, "choice", "validate"); + migrateBoolean(queries, "personToList", "hasVoted"); + migrateBoolean(queries, "poll", "closed"); + migrateBoolean(queries, "poll", "choiceAddAllowed"); + migrateBoolean(queries, "poll", "anonymousVoteAllowed"); + migrateBoolean(queries, "poll", "anonymous"); + migrateBoolean(queries, "poll", "publicResults"); + migrateBoolean(queries, "poll", "continuousResults"); + migrateBoolean(queries, "preventRule", "repeated"); + migrateBoolean(queries, "preventRule", "active"); + migrateBoolean(queries, "preventRule", "oneTime"); + migrateBoolean(queries, "result", "byGroup"); + migrateBoolean(queries, "vote", "anonymous"); + } + + public static final String UPDATE_BOOLEAN_VALUE = "UPDATE %1$s SET %2$s = false where %2$s IS NULL"; + + public static final String UPDATE_BOOLEAN_CONSTRAINST = "ALTER TABLE %s ALTER COLUMN %s SET NOT NULL"; + + private void migrateBoolean(List<String> queries, String tableName, String field) { + + queries.add(String.format(UPDATE_BOOLEAN_VALUE, tableName, field)); + queries.add(String.format(UPDATE_BOOLEAN_CONSTRAINST, tableName, field)); + + } + private void migrateChoiceTypes(TopiaContextImplementor tx, List<String> queries) throws TopiaException { Modified: branches/pollen-1.2.6-struts2/pollen-persistence/src/main/xmi/pollen.properties =================================================================== --- branches/pollen-1.2.6-struts2/pollen-persistence/src/main/xmi/pollen.properties 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-persistence/src/main/xmi/pollen.properties 2012-03-06 10:39:17 UTC (rev 3163) @@ -26,3 +26,4 @@ model.tagvalue.constantPrefix=PROPERTY_ model.tagvalue.java.lang.String=text model.tagvalue.version=1.2.6 +model.tagvalue.doNotGenerateBooleanGetMethods=true Modified: branches/pollen-1.2.6-struts2/pollen-persistence/src/main/xmi/pollen.zargo =================================================================== (Binary files differ) Modified: branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollResultsService.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollResultsService.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollResultsService.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -195,7 +195,7 @@ dto.setHidden(resName != null && resName.startsWith(NumberMethod.HIDDEN_PREFIX)); dto.setValue(res.getResultValue()); - dto.setByGroup(res.getByGroup()); + dto.setByGroup(res.isByGroup()); dto.setChoiceType(poll.getChoiceType()); dto.setVoteCountingType(poll.getVoteCountingType()); results.add(dto); Modified: branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -120,19 +120,19 @@ PollDAO pollDAO = getDAO(Poll.class); Poll result = create(pollDAO); - result.setAnonymous(poll.getAnonymous()); - result.setAnonymousVoteAllowed(poll.getAnonymousVoteAllowed()); + result.setAnonymous(poll.isAnonymous()); + result.setAnonymousVoteAllowed(poll.isAnonymousVoteAllowed()); result.setBeginChoiceDate(poll.getBeginChoiceDate()); result.setBeginDate(poll.getBeginDate()); result.setChoiceType(poll.getChoiceType()); - result.setContinuousResults(poll.getContinuousResults()); + result.setContinuousResults(poll.isContinuousResults()); result.setDescription(poll.getDescription()); result.setEndDate(poll.getEndDate()); result.setEndChoiceDate(poll.getEndChoiceDate()); result.setPollId(poll.getPollId()); result.setPollType(poll.getPollType()); result.setMaxChoiceNb(poll.getMaxChoiceNb()); - result.setPublicResults(poll.getPublicResults()); + result.setPublicResults(poll.isPublicResults()); result.setTitle(poll.getTitle()); result.setVoteCountingType(poll.getVoteCountingType()); @@ -155,10 +155,10 @@ for (PreventRule preventRule : poll.getPreventRule()) { PreventRule preventRuleCreated = create(preventRuleDAO); - preventRuleCreated.setActive(preventRule.getActive()); + preventRuleCreated.setActive(preventRule.isActive()); preventRuleCreated.setMethod(preventRule.getMethod()); - preventRuleCreated.setOneTime(preventRule.getOneTime()); - preventRuleCreated.setRepeated(preventRule.getRepeated()); + preventRuleCreated.setOneTime(preventRule.isOneTime()); + preventRuleCreated.setRepeated(preventRule.isRepeated()); preventRuleCreated.setScope(preventRule.getScope()); preventRuleCreated.setSensibility(preventRule.getSensibility()); result.addPreventRule(preventRule); @@ -185,7 +185,7 @@ for (PersonToList personToList : votingList.getPollAccountPersonToList()) { PersonToList personToListCreated = create(personToListDAO); - personToListCreated.setHasVoted(personToList.getHasVoted()); + personToListCreated.setHasVoted(personToList.isHasVoted()); personToListCreated.setWeight(personToList.getWeight()); votingListCreated.addPollAccountPersonToList(personToListCreated); @@ -215,7 +215,7 @@ Choice choiceCreated = create(choiceDAO); choiceCreated.setDescription(choice.getDescription()); choiceCreated.setName(choice.getName()); - choiceCreated.setValidate(choice.getValidate()); + choiceCreated.setValidate(choice.isValidate()); result.addChoice(choiceCreated); if (choiceType == ChoiceType.IMAGE) { @@ -314,7 +314,7 @@ for (VotingList votingList : poll.getVotingList()) { for (PersonToList personToList : votingList .getPollAccountPersonToList()) { - if (!personToList.getHasVoted()) { + if (!personToList.isHasVoted()) { PollAccount pollAccount = personToList .getPollAccount(); @@ -512,12 +512,12 @@ result.setBeginChoiceDate(poll.getBeginChoiceDate()); result.setBeginDate(poll.getBeginDate()); result.setEndDate(poll.getEndDate()); - result.setAnonymous(poll.getAnonymous()); - result.setAnonymousVoteAllowed(poll.getAnonymousVoteAllowed()); - result.setPublicResults(poll.getPublicResults()); - result.setContinuousResults(poll.getContinuousResults()); - result.setChoiceAddAllowed(poll.getChoiceAddAllowed()); - result.setClosed(poll.getClosed()); + result.setAnonymous(poll.isAnonymous()); + result.setAnonymousVoteAllowed(poll.isAnonymousVoteAllowed()); + result.setPublicResults(poll.isPublicResults()); + result.setContinuousResults(poll.isContinuousResults()); + result.setChoiceAddAllowed(poll.isChoiceAddAllowed()); + result.setClosed(poll.isClosed()); result.setCreatorId(poll.getCreator().getVotingId()); result.setCreatorEmail(poll.getCreator().getEmail()); result.setMaxChoiceNb(poll.getMaxChoiceNb()); Modified: branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -163,7 +163,7 @@ List<Vote> results = new ArrayList<Vote>(); try { // No need to load votes for an anonymous poll - if (poll.getAnonymous()) { + if (poll.isAnonymous()) { return results; } Modified: branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -103,8 +103,7 @@ Set<String> result = Sets.newHashSet(); result.add("vote"); result.add("result"); - Boolean closed = poll.getClosed(); - if (closed == null || !closed) { + if (!poll.isClosed()) { // poll is not closed result.add("edit"); Modified: branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -104,8 +104,7 @@ Set<String> result = Sets.newHashSet(); result.add("vote"); result.add("result"); - Boolean closed = poll.getClosed(); - if (closed == null || !closed) { + if (!poll.isClosed()) { // poll is not closed result.add("edit"); Modified: branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -201,7 +201,7 @@ Date currentTime = serviceContext.getCurrentTime(); - accountFieldDisplayed = !poll.getAnonymous() || isRestrictedPoll() || isGroupPoll(); + accountFieldDisplayed = !poll.isAnonymous() || isRestrictedPoll() || isGroupPoll(); boolean choicestarted = poll.getBeginChoiceDate() == null || poll.getBeginChoiceDate().before(currentTime); boolean choiceended = poll.getEndChoiceDate() != null && poll.getEndChoiceDate().before(currentTime); @@ -210,10 +210,9 @@ //TODO Move this is poll entity pollChoiceOrVoteStarted = pollChoiceStarted || isPollStarted(); - pollChoiceRunning = poll.getChoiceAddAllowed() && pollChoiceStarted; + pollChoiceRunning = poll.isChoiceAddAllowed() && pollChoiceStarted; - pollRunning = !(poll.getClosed() != null && poll.getClosed()) && - isPollStarted() && !isPollFinished(); + pollRunning = !poll.isClosed() && isPollStarted() && !isPollFinished(); //TODO Deal the case of the not loggued poll (using the pollAccountId creatorUser = getPollenSession().getUserAccount() != null && @@ -327,7 +326,7 @@ } // Génération d'un identifiant de vote (si le sondage est libre et anonyme) - if (poll.getAnonymous()) { + if (poll.isAnonymous()) { anonymousVote = true; if (isFreePoll()) { getPollAccount().setVotingId( @@ -437,7 +436,7 @@ if (poll == null) { addActionError(_("pollen.error.poll.notfound")); } else { - if (poll.getClosed() != null && poll.getClosed()) { + if (poll.isClosed()) { addActionMessage(_("pollen.information.pollClosed")); } else if (!isPollStarted()) { addActionMessage(_("pollen.information.pollNotStarted")); Modified: branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-03-05 23:39:29 UTC (rev 3162) +++ branches/pollen-1.2.6-struts2/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-03-06 10:39:17 UTC (rev 3163) @@ -170,7 +170,7 @@ DateFormat.SHORT, DateFormat.SHORT, getLocale())); - if (poll.getPublicResults()) { + if (poll.isPublicResults()) { userAllowed = true; } else if (StringUtils.isNotEmpty(accountId)) { @@ -182,7 +182,7 @@ if (!userAllowed) { addActionError(_("pollen.error.userNotAllowed")); - } else if (!poll.getClosed()) { + } else if (!poll.isClosed()) { addActionMessage(_("pollen.error.pollNotClosed")); loadResults(); } else {