Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteContentDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteContentDAO.java (.../IVoteContentDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteContentDAO.java (.../IVoteContentDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -22,8 +22,8 @@
package org.lamsfoundation.lams.tool.vote.dao;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
/**
* Interface that defines the contract for VoteContent access
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteQueContentDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteQueContentDAO.java (.../IVoteQueContentDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteQueContentDAO.java (.../IVoteQueContentDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
/**
* Interface that defines the contract for VoteQueContent access
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteSessionDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteSessionDAO.java (.../IVoteSessionDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteSessionDAO.java (.../IVoteSessionDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -24,9 +24,9 @@
import java.util.List;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
/**
*
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUserDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUserDAO.java (.../IVoteUserDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUserDAO.java (.../IVoteUserDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -24,8 +24,8 @@
import java.util.List;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
/**
*
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java (.../IVoteUsrAttemptDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java (.../IVoteUsrAttemptDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -28,7 +28,7 @@
import org.lamsfoundation.lams.notebook.service.ICoreNotebookService;
import org.lamsfoundation.lams.tool.vote.dto.OpenTextAnswerDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteStatsDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.usermanagement.service.IUserManagementService;
/**
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java (.../VoteContentDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java (.../VoteContentDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -26,9 +26,9 @@
import org.lamsfoundation.lams.dao.hibernate.LAMSBaseDAO;
import org.lamsfoundation.lams.tool.vote.dao.IVoteContentDAO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
import org.springframework.stereotype.Repository;
/**
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java (.../VoteQueContentDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java (.../VoteQueContentDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -25,7 +25,7 @@
import org.lamsfoundation.lams.dao.hibernate.LAMSBaseDAO;
import org.lamsfoundation.lams.tool.vote.dao.IVoteQueContentDAO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
import org.springframework.stereotype.Repository;
/**
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java (.../VoteSessionDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java (.../VoteSessionDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -26,9 +26,9 @@
import org.lamsfoundation.lams.dao.hibernate.LAMSBaseDAO;
import org.lamsfoundation.lams.tool.vote.dao.IVoteSessionDAO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
import org.springframework.stereotype.Repository;
/**
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java (.../VoteUserDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java (.../VoteUserDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -27,8 +27,8 @@
import org.lamsfoundation.lams.dao.hibernate.LAMSBaseDAO;
import org.lamsfoundation.lams.tool.vote.dao.IVoteUserDAO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
import org.springframework.stereotype.Repository;
/**
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java (.../VoteUsrAttemptDAO.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java (.../VoteUsrAttemptDAO.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -43,7 +43,7 @@
import org.lamsfoundation.lams.tool.vote.dao.IVoteUsrAttemptDAO;
import org.lamsfoundation.lams.tool.vote.dto.OpenTextAnswerDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteStatsDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.usermanagement.service.IUserManagementService;
import org.springframework.stereotype.Repository;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteContent.java
===================================================================
diff -u
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteContent.java (revision 0)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteContent.java (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -0,0 +1,455 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+package org.lamsfoundation.lams.tool.vote.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ *
+ * Persistent object/bean that defines the content for the Voting tool. Provides accessors and mutators to get/set
+ * attributes It maps to database table: tl_lavote11_content
+ *
+ *
+ * @author Ozgur Demirtas
+ */
+public class VoteContent implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1986729606785509746L;
+
+ /** identifier field */
+ private Long uid;
+
+ /** persistent field */
+ private Long voteContentId;
+
+ /** nullable persistent field */
+ private String title;
+
+ /** nullable persistent field */
+ private String reflectionSubject;
+
+ private String instructions;
+
+ /** nullable persistent field */
+ private boolean defineLater;
+
+ /** nullable persistent field */
+ private Date creationDate;
+
+ /** nullable persistent field */
+ private Date updateDate;
+
+ /** nullable persistent field */
+ private long createdBy;
+
+ private boolean useSelectLeaderToolOuput;
+
+ private boolean reflect;
+
+ private boolean allowText;
+
+ private String maxNominationCount;
+
+ private String minNominationCount;
+
+ /** nullable persistent field */
+ private boolean lockOnFinish;
+
+ private boolean showResults;
+
+ /** persistent field */
+ private Set voteQueContents;
+
+ /** persistent field */
+ private Set voteSessions;
+
+ private Date submissionDeadline;
+
+ /**
+ * persistent field This field can be calculated, but introducing it reduces number of DB calls.
+ */
+ private Boolean assignedDataFlowObject;
+
+ /** persistent field */
+ private Short maxExternalInputs;
+
+ /** persistent field */
+ private Short externalInputsAdded;
+
+ /** full constructor */
+ public VoteContent(Long voteContentId, String title, String instructions, boolean defineLater, Date creationDate,
+ Date updateDate, boolean allowText, boolean useSelectLeaderToolOuput, boolean reflect,
+ String reflectionSubject, String maxNominationCount, String minNominationCount, long createdBy,
+ boolean lockOnFinish, boolean showResults, Short maxExternalInputs, Short externalInputsAdded,
+ Set voteQueContents, Set voteSessions) {
+ this.voteContentId = voteContentId;
+ this.title = title;
+ this.instructions = instructions;
+ this.defineLater = defineLater;
+ this.creationDate = creationDate;
+ this.updateDate = updateDate;
+ this.maxNominationCount = maxNominationCount;
+ this.minNominationCount = minNominationCount;
+ this.allowText = allowText;
+ this.useSelectLeaderToolOuput = useSelectLeaderToolOuput;
+ this.reflect = reflect;
+ this.reflectionSubject = reflectionSubject;
+ this.createdBy = createdBy;
+ this.lockOnFinish = lockOnFinish;
+ this.showResults = showResults;
+ this.voteQueContents = voteQueContents;
+ this.voteSessions = voteSessions;
+ this.maxExternalInputs = maxExternalInputs;
+ this.externalInputsAdded = externalInputsAdded;
+ }
+
+ /** default constructor */
+ public VoteContent() {
+ }
+
+ /** minimal constructor */
+ public VoteContent(Long voteContentId, Set voteQueContents, Set voteSessions) {
+ this.voteContentId = voteContentId;
+ this.voteQueContents = voteQueContents;
+ this.voteSessions = voteSessions;
+ }
+
+ /**
+ * gets called as part of the copyToolContent
+ *
+ * Copy Construtor to create a new mc content instance. Note that we don't copy the mc session data here because the
+ * mc session will be created after we copied tool content.
+ *
+ * @param mc
+ * the original mc content.
+ * @param newContentId
+ * the new mc content id.
+ * @return the new mc content object.
+ */
+ public static VoteContent newInstance(VoteContent vote, Long newContentId) {
+ VoteContent newContent = new VoteContent(newContentId, vote.getTitle(), vote.getInstructions(),
+ vote.isDefineLater(), vote.getCreationDate(), vote.getUpdateDate(), vote.isAllowText(),
+ vote.isUseSelectLeaderToolOuput(), vote.isReflect(), vote.getReflectionSubject(),
+ vote.getMaxNominationCount(), vote.getMinNominationCount(), vote.getCreatedBy(), vote.isLockOnFinish(),
+ vote.isShowResults(), vote.getMaxExternalInputs(), vote.getExternalInputsAdded(),
+ new TreeSet(), new TreeSet());
+ newContent.setVoteQueContents(vote.deepCopyMcQueContent(newContent));
+ newContent.setAssignedDataFlowObject(vote.getAssignedDataFlowObject());
+
+ return newContent;
+ }
+
+ /**
+ * gets called as part of the copyToolContent
+ *
+ * @param newQaContent
+ * @return Set
+ */
+ public Set deepCopyMcQueContent(VoteContent newMcContent) {
+
+ Set newMcQueContent = new TreeSet<>();
+ for (Iterator i = this.getVoteQueContents().iterator(); i.hasNext();) {
+ VoteQueContent queContent = i.next();
+ if (queContent.getMcContent() != null) {
+ int displayOrder = queContent.getDisplayOrder();
+ VoteQueContent mcQueContent = VoteQueContent.newInstance(queContent, displayOrder, newMcContent);
+ newMcQueContent.add(mcQueContent);
+ }
+ }
+ return newMcQueContent;
+ }
+
+ public Long getUid() {
+ return uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getInstructions() {
+ return instructions;
+ }
+
+ public void setInstructions(String instructions) {
+ this.instructions = instructions;
+ }
+
+ public boolean isDefineLater() {
+ return defineLater;
+ }
+
+ public void setDefineLater(boolean defineLater) {
+ this.defineLater = defineLater;
+ }
+
+ public Date getUpdateDate() {
+ return updateDate;
+ }
+
+ public void setUpdateDate(Date updateDate) {
+ this.updateDate = updateDate;
+ }
+
+ public long getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedBy(long createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ /**
+ * @return Returns the voteQueContents.
+ */
+ public Set getVoteQueContents() {
+ if (voteQueContents == null) {
+ setVoteQueContents(new HashSet());
+ }
+ return voteQueContents;
+
+ }
+
+ /**
+ * @param voteQueContents
+ * The voteQueContents to set.
+ */
+ public void setVoteQueContents(Set voteQueContents) {
+ this.voteQueContents = voteQueContents;
+ }
+
+ /**
+ * @return Returns the voteSessions.
+ */
+ public Set getVoteSessions() {
+ if (voteSessions == null) {
+ setVoteSessions(new HashSet());
+ }
+ return voteSessions;
+ }
+
+ /**
+ * @param voteSessions
+ * The voteSessions to set.
+ */
+ public void setVoteSessions(Set voteSessions) {
+ this.voteSessions = voteSessions;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("uid", getUid()).toString();
+ }
+
+ /**
+ * @return Returns the creationDate.
+ */
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ /**
+ * @param creationDate
+ * The creationDate to set.
+ */
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ /**
+ * @return Returns the lockOnFinish.
+ */
+ public boolean isLockOnFinish() {
+ return lockOnFinish;
+ }
+
+ /**
+ * @param lockOnFinish
+ * The lockOnFinish to set.
+ */
+ public void setLockOnFinish(boolean lockOnFinish) {
+ this.lockOnFinish = lockOnFinish;
+ }
+
+ /**
+ * @return Returns the voteContentId.
+ */
+ public Long getVoteContentId() {
+ return voteContentId;
+ }
+
+ /**
+ * @param voteContentId
+ * The voteContentId to set.
+ */
+ public void setVoteContentId(Long voteContentId) {
+ this.voteContentId = voteContentId;
+ }
+
+ /**
+ * @return Returns the allowText.
+ */
+ public boolean isAllowText() {
+ return allowText;
+ }
+
+ /**
+ * @param allowText
+ * The allowText to set.
+ */
+ public void setAllowText(boolean allowText) {
+ this.allowText = allowText;
+ }
+
+ /**
+ * @return Returns the maxNominationCount.
+ */
+ public String getMaxNominationCount() {
+ return maxNominationCount;
+ }
+
+ /**
+ * @param maxNominationCount
+ * The maxNominationCount to set.
+ */
+ public void setMaxNominationCount(String maxNominationCount) {
+ this.maxNominationCount = maxNominationCount;
+ }
+
+ /**
+ * @return Returns the minNominationCount.
+ */
+ public String getMinNominationCount() {
+ return minNominationCount;
+ }
+
+ /**
+ * @param minNominationCount
+ * The minNominationCount to set.
+ */
+ public void setMinNominationCount(String minNominationCount) {
+ this.minNominationCount = minNominationCount;
+ }
+
+ /**
+ * @return Returns the reflect.
+ */
+ public boolean isReflect() {
+ return reflect;
+ }
+
+ /**
+ * @param reflect
+ * The reflect to set.
+ */
+ public void setReflect(boolean reflect) {
+ this.reflect = reflect;
+ }
+
+ /**
+ * @param useSelectLeaderToolOuput
+ * The useSelectLeaderToolOuput to set.
+ */
+ public boolean isUseSelectLeaderToolOuput() {
+ return useSelectLeaderToolOuput;
+ }
+
+ /**
+ * @return Returns the useSelectLeaderToolOuput.
+ */
+ public void setUseSelectLeaderToolOuput(boolean useSelectLeaderToolOuput) {
+ this.useSelectLeaderToolOuput = useSelectLeaderToolOuput;
+ }
+
+ /**
+ * @return Returns the reflectionSubject.
+ */
+ public String getReflectionSubject() {
+ return reflectionSubject;
+ }
+
+ /**
+ * @param reflectionSubject
+ * The reflectionSubject to set.
+ */
+ public void setReflectionSubject(String reflectionSubject) {
+ this.reflectionSubject = reflectionSubject;
+ }
+
+ public boolean isShowResults() {
+ return showResults;
+ }
+
+ public void setShowResults(boolean showResults) {
+ this.showResults = showResults;
+ }
+
+ public Boolean getAssignedDataFlowObject() {
+ return assignedDataFlowObject;
+ }
+
+ public void setAssignedDataFlowObject(Boolean assignedDataFlowObject) {
+ this.assignedDataFlowObject = assignedDataFlowObject;
+ }
+
+ public Short getMaxExternalInputs() {
+ return maxExternalInputs;
+ }
+
+ public void setMaxExternalInputs(Short maxInputs) {
+ maxExternalInputs = maxInputs;
+ }
+
+ public Short getExternalInputsAdded() {
+ return externalInputsAdded;
+ }
+
+ public void setExternalInputsAdded(Short externalInputsAdded) {
+ this.externalInputsAdded = externalInputsAdded;
+ }
+
+ public void setSubmissionDeadline(Date submissionDeadline) {
+ this.submissionDeadline = submissionDeadline;
+ }
+
+ public Date getSubmissionDeadline() {
+ return submissionDeadline;
+ }
+}
\ No newline at end of file
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteQueContent.java
===================================================================
diff -u
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteQueContent.java (revision 0)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteQueContent.java (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -0,0 +1,169 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.vote.model;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * Persistent object/bean that defines the question content for the Voting tool. Provides accessors and mutators to
+ * get/set attributes It maps to database table: tl_lavote11_nomination_content
+ *
+ * @author Ozgur Demirtas
+ */
+public class VoteQueContent implements Serializable, Comparable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1598466582549757720L;
+
+ /** identifier field */
+ private Long uid;
+
+ /** nullable persistent field */
+ private String question;
+
+ private int displayOrder;
+
+ /** non persistent field */
+ private Long voteContentId;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.tool.vote.model.VoteContent voteContent;
+
+ public VoteQueContent(String question, VoteContent voteContent) {
+ this.question = question;
+ this.voteContent = voteContent;
+ }
+
+ public VoteQueContent(String question, int displayOrder, VoteContent voteContent) {
+ this.question = question;
+ this.displayOrder = displayOrder;
+ this.voteContent = voteContent;
+ }
+
+ /** default constructor */
+ public VoteQueContent() {
+ }
+
+ /**
+ * gets called by copyToolContent
+ *
+ * Copy constructor
+ *
+ * @param queContent
+ * the original qa question content
+ * @return the new qa question content object
+ */
+ public static VoteQueContent newInstance(VoteQueContent queContent, int displayOrder, VoteContent newMcContent) {
+ VoteQueContent newQueContent = new VoteQueContent(queContent.getQuestion(), displayOrder, newMcContent);
+
+ return newQueContent;
+ }
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ public String getQuestion() {
+ return this.question;
+ }
+
+ public void setQuestion(String question) {
+ this.question = question;
+ }
+
+ public org.lamsfoundation.lams.tool.vote.model.VoteContent getMcContent() {
+ return this.voteContent;
+ }
+
+ public void setMcContent(org.lamsfoundation.lams.tool.vote.model.VoteContent voteContent) {
+ this.voteContent = voteContent;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("uid", getUid()).toString();
+ }
+
+ @Override
+ public int compareTo(VoteQueContent queContent) {
+ // if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference.
+ if (uid == null) {
+ return 1;
+ } else {
+ return (int) (uid.longValue() - queContent.uid.longValue());
+ }
+ }
+
+ /**
+ * @return Returns the voteContentId.
+ */
+ public Long getVoteContentId() {
+ return voteContentId;
+ }
+
+ /**
+ * @param voteContentId
+ * The voteContentId to set.
+ */
+ public void setVoteContentId(Long voteContentId) {
+ this.voteContentId = voteContentId;
+ }
+
+ /**
+ * @return Returns the voteContent.
+ */
+ public org.lamsfoundation.lams.tool.vote.model.VoteContent getVoteContent() {
+ return voteContent;
+ }
+
+ /**
+ * @param voteContent
+ * The voteContent to set.
+ */
+ public void setVoteContent(org.lamsfoundation.lams.tool.vote.model.VoteContent voteContent) {
+ this.voteContent = voteContent;
+ }
+
+ /**
+ * @return Returns the displayOrder.
+ */
+ public int getDisplayOrder() {
+ return displayOrder;
+ }
+
+ /**
+ * @param displayOrder
+ * The displayOrder to set.
+ */
+ public void setDisplayOrder(int displayOrder) {
+ this.displayOrder = displayOrder;
+ }
+}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteQueUsr.java
===================================================================
diff -u
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteQueUsr.java (revision 0)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteQueUsr.java (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -0,0 +1,219 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.vote.model;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ *
+ * Persistent object/bean that defines the user for the Voting tool.
+ * Provides accessors and mutators to get/set attributes
+ * It maps to database table: tl_lavote11_que_usr
+ *
+ *
+ * @author Ozgur Demirtas
+ */
+public class VoteQueUsr implements Serializable, Comparable {
+
+ private static final long serialVersionUID = 7303944502340276133L;
+
+ /** identifier field */
+ private Long uid;
+
+ /** persistent field */
+ private Long queUsrId;
+
+ /** nullable persistent field */
+ private String username;
+
+ /** nullable persistent field */
+ private String fullname;
+
+ private boolean responseFinalised;
+
+ private boolean finalScreenRequested;
+
+ private Long voteSessionId;
+
+ /** nullable persistent field */
+ private VoteSession voteSession;
+
+ /** persistent field */
+ private Set voteUsrAttempts;
+
+ /** full constructor */
+ public VoteQueUsr(Long queUsrId, String username, String fullname, VoteSession voteSession,
+ Set voteUsrAttempts) {
+ this.queUsrId = queUsrId;
+ this.username = username;
+ this.fullname = fullname;
+ this.voteSession = voteSession;
+ this.voteSessionId = voteSession.getUid();
+ this.voteUsrAttempts = voteUsrAttempts;
+ }
+
+ /** default constructor */
+ public VoteQueUsr() {
+ }
+
+ /** minimal constructor */
+ public VoteQueUsr(Long queUsrId, Set voteUsrAttempts) {
+ this.queUsrId = queUsrId;
+ this.voteUsrAttempts = voteUsrAttempts;
+ }
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ public Long getQueUsrId() {
+ return this.queUsrId;
+ }
+
+ public void setQueUsrId(Long queUsrId) {
+ this.queUsrId = queUsrId;
+ }
+
+ public String getUsername() {
+ return this.username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getFullname() {
+ return this.fullname;
+ }
+
+ public void setFullname(String fullname) {
+ this.fullname = fullname;
+ }
+
+ public Set getVoteUsrAttempts() {
+ if (this.voteUsrAttempts == null) {
+ setVoteUsrAttempts(new HashSet());
+ }
+ return this.voteUsrAttempts;
+ }
+
+ public void setMcUsrAttempts(Set voteUsrAttempts) {
+ this.voteUsrAttempts = voteUsrAttempts;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("uid", getUid()).toString();
+ }
+
+ /**
+ * Beware, it references Votesession.uid field (not the Votesession.voteSessionId).
+ *
+ * @return Returns the voteSessionId.
+ */
+ public Long getVoteSessionId() {
+ return voteSessionId;
+ }
+
+ /**
+ * Beware, it references Votesession.uid field (not the Votesession.voteSessionId).
+ *
+ * @param voteSessionId
+ * The voteSessionId to set.
+ */
+ public void setVoteSessionId(Long voteSessionId) {
+ this.voteSessionId = voteSessionId;
+ }
+
+ /**
+ * @return Returns the voteSession.
+ */
+ public VoteSession getVoteSession() {
+ return voteSession;
+ }
+
+ /**
+ * @param voteSession
+ * The voteSession to set.
+ */
+ public void setVoteSession(VoteSession voteSession) {
+ this.voteSession = voteSession;
+ }
+
+ /**
+ * @param voteUsrAttempts
+ * The voteUsrAttempts to set.
+ */
+ public void setVoteUsrAttempts(Set voteUsrAttempts) {
+ this.voteUsrAttempts = voteUsrAttempts;
+ }
+
+ /**
+ * @return Returns the responseFinalised.
+ */
+ public boolean isResponseFinalised() {
+ return responseFinalised;
+ }
+
+ /**
+ * @param responseFinalised
+ * The responseFinalised to set.
+ */
+ public void setResponseFinalised(boolean responseFinalised) {
+ this.responseFinalised = responseFinalised;
+ }
+
+ /**
+ * @return Returns the finalScreenRequested.
+ */
+ public boolean isFinalScreenRequested() {
+ return finalScreenRequested;
+ }
+
+ /**
+ * @param finalScreenRequested
+ * The finalScreenRequested to set.
+ */
+ public void setFinalScreenRequested(boolean finalScreenRequested) {
+ this.finalScreenRequested = finalScreenRequested;
+ }
+
+ @Override
+ public int compareTo(VoteQueUsr other) {
+ // if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference.
+ if (uid == null) {
+ return 1;
+ } else {
+ return (int) (uid.longValue() - other.uid.longValue());
+ }
+ }
+
+}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteSession.java
===================================================================
diff -u
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteSession.java (revision 0)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteSession.java (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -0,0 +1,251 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.vote.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ *
+ * Persistent object/bean that defines the content for the Voting tool. Provides accessors and mutators to get/set
+ * attributes It maps to database table: tl_lavote11_session
+ *
+ *
+ * @author Ozgur Demirtas
+ */
+public class VoteSession implements Serializable, Comparable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5053800653198292982L;
+
+ public final static String INCOMPLETE = "INCOMPLETE";
+
+ public static final String COMPLETED = "COMPLETED";
+
+ /** identifier field */
+ private Long uid;
+
+ /** persistent field */
+ private Long voteSessionId;
+
+ /** nullable persistent field */
+ private Date sessionStartDate;
+
+ /** nullable persistent field */
+ private Date sessionEndDate;
+
+ /** nullable persistent field */
+ private String sessionStatus;
+
+ private String session_name;
+
+ /** nullable persistent field */
+ private Long voteContentId;
+
+ /** nullable persistent field */
+ private VoteContent voteContent;
+
+ /** persistent field */
+ private Set voteQueUsers;
+
+ /** persistent field */
+ private VoteQueUsr groupLeader;
+
+ public VoteSession(Long voteSessionId, Date sessionStartDate, String sessionStatus, String session_name,
+ VoteContent voteContent, Set voteQueUsers) {
+ this.voteSessionId = voteSessionId;
+ this.sessionStartDate = sessionStartDate;
+ this.sessionStatus = sessionStatus;
+ this.session_name = session_name;
+ this.voteContent = voteContent;
+ this.voteQueUsers = voteQueUsers;
+ }
+
+ /** default constructor */
+ public VoteSession() {
+ }
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("uid", getUid()).toString();
+ }
+
+ /**
+ * @return Returns the sessionEndDate.
+ */
+ public Date getSessionEndDate() {
+ return sessionEndDate;
+ }
+
+ /**
+ * @param sessionEndDate
+ * The sessionEndDate to set.
+ */
+ public void setSessionEndDate(Date sessionEndDate) {
+ this.sessionEndDate = sessionEndDate;
+ }
+
+ /**
+ * @return Returns the sessionStartDate.
+ */
+ public Date getSessionStartDate() {
+ return sessionStartDate;
+ }
+
+ /**
+ * @param sessionStartDate
+ * The sessionStartDate to set.
+ */
+ public void setSessionStartDate(Date sessionStartDate) {
+ this.sessionStartDate = sessionStartDate;
+ }
+
+ /**
+ * @return Returns the sessionStatus.
+ */
+ public String getSessionStatus() {
+ return sessionStatus;
+ }
+
+ /**
+ * @param sessionStatus
+ * The sessionStatus to set.
+ */
+ public void setSessionStatus(String sessionStatus) {
+ this.sessionStatus = sessionStatus;
+ }
+
+ /**
+ * @return Returns the session_name.
+ */
+ public String getSession_name() {
+ return session_name;
+ }
+
+ /**
+ * @param session_name
+ * The session_name to set.
+ */
+ public void setSession_name(String session_name) {
+ this.session_name = session_name;
+ }
+
+ /**
+ * @return Returns the voteSessionId.
+ */
+ public Long getVoteSessionId() {
+ return voteSessionId;
+ }
+
+ /**
+ * @param voteSessionId
+ * The voteSessionId to set.
+ */
+ public void setVoteSessionId(Long voteSessionId) {
+ this.voteSessionId = voteSessionId;
+ }
+
+ /**
+ * @return Returns the voteContentId.
+ */
+ public Long getVoteContentId() {
+ return voteContentId;
+ }
+
+ /**
+ * @param voteContentId
+ * The voteContentId to set.
+ */
+ public void setVoteContentId(Long voteContentId) {
+ this.voteContentId = voteContentId;
+ }
+
+ /**
+ * @return Returns the voteContent.
+ */
+ public VoteContent getVoteContent() {
+ return voteContent;
+ }
+
+ /**
+ * @param voteContent
+ * The voteContent to set.
+ */
+ public void setVoteContent(VoteContent voteContent) {
+ this.voteContent = voteContent;
+ }
+
+ /**
+ * @return Returns the voteQueUsers.
+ */
+ public Set getVoteQueUsers() {
+ return voteQueUsers;
+ }
+
+ /**
+ * @param voteQueUsers
+ * The voteQueUsers to set.
+ */
+ public void setVoteQueUsers(Set voteQueUsers) {
+ this.voteQueUsers = voteQueUsers;
+ }
+
+ /**
+ * @return Returns the groupLeader.
+ */
+ public VoteQueUsr getGroupLeader() {
+ return this.groupLeader;
+ }
+
+ /**
+ * @param groupLeader
+ * The groupLeader to set.
+ */
+ public void setGroupLeader(VoteQueUsr groupLeader) {
+ this.groupLeader = groupLeader;
+ }
+
+ @Override
+ public int compareTo(VoteSession other) {
+ // if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference.
+ if (uid == null) {
+ return 1;
+ } else {
+ return (int) (uid.longValue() - other.uid.longValue());
+ }
+ }
+
+}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteUsrAttempt.java
===================================================================
diff -u
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteUsrAttempt.java (revision 0)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/model/VoteUsrAttempt.java (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -0,0 +1,224 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.vote.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ *
+ * Persistent object/bean that defines the user attempt for the MCQ tool. Provides accessors and mutators to get/set
+ * attributes It maps to database table: tl_lavote11_usr_attempt
+ *
+ *
+ * @author Ozgur Demirtas
+ */
+public class VoteUsrAttempt implements Serializable, Comparable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6756874212158405114L;
+
+ /** identifier field */
+ private Long uid;
+
+ /** persistent field */
+ private Long attemptId;
+
+ /** nullable persistent field */
+ private Date attemptTime;
+
+ /** nullable persistent field */
+ private String timeZone;
+
+ private String userEntry;
+
+ private Long queUsrId;
+
+ private boolean visible;
+
+ private boolean singleUserEntry;
+
+ /** persistent field */
+ private VoteQueContent voteQueContent;
+
+ /** persistent field */
+ private VoteQueUsr voteQueUsr;
+
+ public VoteUsrAttempt(Date attemptTime, String timeZone, VoteQueContent voteQueContent, VoteQueUsr voteQueUsr,
+ String userEntry, boolean visible) {
+ this.attemptTime = attemptTime;
+ this.timeZone = timeZone;
+ this.voteQueContent = voteQueContent;
+ //this.voteQueContentId = voteQueContent.getVoteQueContentId();
+ this.voteQueUsr = voteQueUsr;
+ this.userEntry = userEntry;
+ this.visible = visible;
+ }
+
+ /** default constructor */
+ public VoteUsrAttempt() {
+ }
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ public Long getAttemptId() {
+ return this.attemptId;
+ }
+
+ public void setAttemptId(Long attemptId) {
+ this.attemptId = attemptId;
+ }
+
+ public Date getAttemptTime() {
+ return this.attemptTime;
+ }
+
+ public void setAttemptTime(Date attemptTime) {
+ this.attemptTime = attemptTime;
+ }
+
+ public String getTimeZone() {
+ return this.timeZone;
+ }
+
+ public void setTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("nomination:", voteQueContent.getQuestion())
+ .append("userEntry:", userEntry).toString();
+ }
+
+ /**
+ * @return Returns the queUsrId.
+ */
+ public Long getQueUsrId() {
+ return queUsrId;
+ }
+
+ /**
+ * @param queUsrId
+ * The queUsrId to set.
+ */
+ public void setQueUsrId(Long queUsrId) {
+ this.queUsrId = queUsrId;
+ }
+
+ /**
+ * @return Returns the voteQueContent.
+ */
+ public VoteQueContent getVoteQueContent() {
+ return voteQueContent;
+ }
+
+ /**
+ * @param voteQueContent
+ * The voteQueContent to set.
+ */
+ public void setVoteQueContent(VoteQueContent voteQueContent) {
+ this.voteQueContent = voteQueContent;
+ }
+
+ /**
+ * @return Returns the voteQueUsr.
+ */
+ public VoteQueUsr getVoteQueUsr() {
+ return voteQueUsr;
+ }
+
+ /**
+ * @param voteQueUsr
+ * The voteQueUsr to set.
+ */
+ public void setVoteQueUsr(VoteQueUsr voteQueUsr) {
+ this.voteQueUsr = voteQueUsr;
+ }
+
+ /**
+ * @return Returns the userEntry.
+ */
+ public String getUserEntry() {
+ return userEntry;
+ }
+
+ /**
+ * @param userEntry
+ * The userEntry to set.
+ */
+ public void setUserEntry(String userEntry) {
+ this.userEntry = userEntry;
+ }
+
+ /**
+ * @return Returns the singleUserEntry.
+ */
+ public boolean isSingleUserEntry() {
+ return singleUserEntry;
+ }
+
+ /**
+ * @param singleUserEntry
+ * The singleUserEntry to set.
+ */
+ public void setSingleUserEntry(boolean singleUserEntry) {
+ this.singleUserEntry = singleUserEntry;
+ }
+
+ /**
+ * @return Returns the visible.
+ */
+ public boolean isVisible() {
+ return visible;
+ }
+
+ /**
+ * @param visible
+ * The visible to set.
+ */
+ public void setVisible(boolean visible) {
+ this.visible = visible;
+ }
+
+ @Override
+ public int compareTo(VoteUsrAttempt other) {
+ // if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference.
+ if (uid == null) {
+ return 1;
+ } else {
+ return (int) (uid.longValue() - other.uid.longValue());
+ }
+ }
+
+}
Fisheye: Tag 879fb356ece6075603479b01215a6b05465a59c8 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteContent.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 879fb356ece6075603479b01215a6b05465a59c8 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 879fb356ece6075603479b01215a6b05465a59c8 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueUsr.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 879fb356ece6075603479b01215a6b05465a59c8 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteSession.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 879fb356ece6075603479b01215a6b05465a59c8 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -46,11 +46,11 @@
import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteQuestionDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteStatsDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.util.VoteApplicationException;
import org.lamsfoundation.lams.util.MessageService;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteImportContentVersionFilter.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteImportContentVersionFilter.java (.../VoteImportContentVersionFilter.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteImportContentVersionFilter.java (.../VoteImportContentVersionFilter.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -23,7 +23,7 @@
package org.lamsfoundation.lams.tool.vote.service;
import org.lamsfoundation.lams.learningdesign.service.ToolContentVersionFilter;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
/**
* Import filter class for different versions of Vote content.
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java (.../VoteOutputFactory.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java (.../VoteOutputFactory.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -36,11 +36,11 @@
import org.lamsfoundation.lams.tool.SimpleURL;
import org.lamsfoundation.lams.tool.ToolOutput;
import org.lamsfoundation.lams.tool.ToolOutputDefinition;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.util.VoteUtils;
public class VoteOutputFactory extends OutputFactory {
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteService.java
===================================================================
diff -u -r62aaf160878735888d077bf28fac3c1989bb8fbd -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteService.java (.../VoteService.java) (revision 62aaf160878735888d077bf28fac3c1989bb8fbd)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteService.java (.../VoteService.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -83,11 +83,11 @@
import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteQuestionDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteStatsDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.util.VoteApplicationException;
import org.lamsfoundation.lams.tool.vote.util.VoteComparator;
import org.lamsfoundation.lams.tool.vote.util.VoteUtils;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteUtils.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteUtils.java (.../VoteUtils.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteUtils.java (.../VoteUtils.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -25,7 +25,7 @@
import javax.servlet.http.HttpServletRequest;
import org.lamsfoundation.lams.tool.vote.VoteAppConstants;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
/**
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/AuthoringController.java
===================================================================
diff -u -rf2ad75cef0c507a64877942631fee13efbc6ed50 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/AuthoringController.java (.../AuthoringController.java) (revision f2ad75cef0c507a64877942631fee13efbc6ed50)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -40,8 +40,8 @@
import org.lamsfoundation.lams.tool.vote.VoteAppConstants;
import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralAuthoringDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteQuestionDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.util.VoteComparator;
import org.lamsfoundation.lams.tool.vote.util.VoteUtils;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/LearningController.java
===================================================================
diff -u -rf2ad75cef0c507a64877942631fee13efbc6ed50 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/LearningController.java (.../LearningController.java) (revision f2ad75cef0c507a64877942631fee13efbc6ed50)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/LearningController.java (.../LearningController.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -45,11 +45,11 @@
import org.lamsfoundation.lams.tool.exception.ToolException;
import org.lamsfoundation.lams.tool.vote.VoteAppConstants;
import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueUsr;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.util.VoteApplicationException;
import org.lamsfoundation.lams.tool.vote.util.VoteComparator;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/MonitoringController.java
===================================================================
diff -u -rf2ad75cef0c507a64877942631fee13efbc6ed50 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/MonitoringController.java (.../MonitoringController.java) (revision f2ad75cef0c507a64877942631fee13efbc6ed50)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/MonitoringController.java (.../MonitoringController.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -43,9 +43,9 @@
import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteQuestionDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.util.VoteComparator;
import org.lamsfoundation.lams.tool.vote.web.form.VoteMonitoringForm;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/VoteChartGeneratorController.java
===================================================================
diff -u -rf2ad75cef0c507a64877942631fee13efbc6ed50 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/VoteChartGeneratorController.java (.../VoteChartGeneratorController.java) (revision f2ad75cef0c507a64877942631fee13efbc6ed50)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/VoteChartGeneratorController.java (.../VoteChartGeneratorController.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -32,8 +32,8 @@
import org.apache.commons.lang.StringUtils;
import org.lamsfoundation.lams.tool.vote.dto.SessionDTO;
import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteSession;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.util.VoteUtils;
import org.lamsfoundation.lams.util.WebUtil;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/VotePedagogicalPlannerController.java
===================================================================
diff -u -rf2ad75cef0c507a64877942631fee13efbc6ed50 -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/VotePedagogicalPlannerController.java (.../VotePedagogicalPlannerController.java) (revision f2ad75cef0c507a64877942631fee13efbc6ed50)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/controller/VotePedagogicalPlannerController.java (.../VotePedagogicalPlannerController.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -26,8 +26,8 @@
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.web.form.VotePedagogicalPlannerForm;
import org.lamsfoundation.lams.util.MessageService;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VotePedagogicalPlannerForm.java
===================================================================
diff -u -r62aaf160878735888d077bf28fac3c1989bb8fbd -r879fb356ece6075603479b01215a6b05465a59c8
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VotePedagogicalPlannerForm.java (.../VotePedagogicalPlannerForm.java) (revision 62aaf160878735888d077bf28fac3c1989bb8fbd)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VotePedagogicalPlannerForm.java (.../VotePedagogicalPlannerForm.java) (revision 879fb356ece6075603479b01215a6b05465a59c8)
@@ -28,8 +28,8 @@
import org.apache.commons.lang.StringUtils;
import org.lamsfoundation.lams.planner.PedagogicalPlannerActivitySpringForm;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
-import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteContent;
+import org.lamsfoundation.lams.tool.vote.model.VoteQueContent;
import org.lamsfoundation.lams.util.MessageService;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;