Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java,v diff -u -r1.10.2.5 -r1.10.2.6 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java 19 Oct 2016 01:53:23 -0000 1.10.2.5 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java 19 Oct 2016 02:09:26 -0000 1.10.2.6 @@ -23,7 +23,6 @@ package org.lamsfoundation.lams.tool.vote.dao.hibernate; import java.util.List; -import java.util.Set; import org.hibernate.FlushMode; import org.lamsfoundation.lams.dao.hibernate.LAMSBaseDAO; @@ -64,11 +63,11 @@ @Override public VoteContent getVoteContentByContentId(Long voteContentId) { String query = "from VoteContent as vote where vote.voteContentId = ?"; - List list = getSessionFactory().getCurrentSession().createQuery(query).setLong(0, voteContentId.longValue()) - .list(); + List list = getSessionFactory().getCurrentSession().createQuery(query) + .setLong(0, voteContentId.longValue()).list(); if (list != null && list.size() > 0) { - VoteContent vote = (VoteContent) list.get(0); + VoteContent vote = list.get(0); return vote; } return null; @@ -96,11 +95,11 @@ @Override public void removeVoteById(Long voteContentId) { if (voteContentId != null) { - List list = getSessionFactory().getCurrentSession().createQuery(VoteContentDAO.FIND_VOTE_CONTENT) - .setLong(0, voteContentId.longValue()).list(); + List list = getSessionFactory().getCurrentSession() + .createQuery(VoteContentDAO.FIND_VOTE_CONTENT).setLong(0, voteContentId.longValue()).list(); if (list != null && list.size() > 0) { - VoteContent vote = (VoteContent) list.get(0); + VoteContent vote = list.get(0); getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); getSession().delete(vote); getSession().flush(); @@ -126,7 +125,7 @@ @Override public void removeQuestionsFromCache(VoteContent voteContent) { if (voteContent != null) { - for (VoteQueContent question : (Set) voteContent.getVoteQueContents()) { + for (VoteQueContent question : voteContent.getVoteQueContents()) { getSession().evict(question); } } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java,v diff -u -r1.10.2.5 -r1.10.2.6 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java 19 Oct 2016 01:56:46 -0000 1.10.2.5 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java 19 Oct 2016 02:10:05 -0000 1.10.2.6 @@ -38,7 +38,7 @@ @Repository public class VoteQueContentDAO extends LAMSBaseDAO implements IVoteQueContentDAO { - // private static final String CLEAN_QUESTION_CONTENT_BY_CONTENT_ID_SIMPLE = "from voteQueContent in class VoteQueContent where voteQueContent.voteContentId=:voteContentId"; + // private static final String CLEAN_QUESTION_CONTENT_BY_CONTENT_ID_SIMPLE = "from voteQueContent in class VoteQueContent where voteQueContent.voteContentId=:voteContentId"; private static final String LOAD_QUESTION_CONTENT_BY_CONTENT_ID = "from voteQueContent in class VoteQueContent where voteQueContent.voteContentId=:voteContentId"; @@ -55,11 +55,11 @@ @Override public VoteQueContent getDefaultVoteContentFirstQuestion() { final long voteContentId = 1; - List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID) - .setLong("voteContentId", voteContentId).list(); + List list = getSessionFactory().getCurrentSession() + .createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID).setLong("voteContentId", voteContentId).list(); if (list != null && list.size() > 0) { - VoteQueContent voteq = (VoteQueContent) list.get(0); + VoteQueContent voteq = list.get(0); return voteq; } return null; @@ -68,12 +68,12 @@ @SuppressWarnings("unchecked") @Override public VoteQueContent getQuestionByDisplayOrder(final Long displayOrder, final Long voteContentUid) { - List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_DISPLAY_ORDER) - .setLong("displayOrder", displayOrder.longValue()).setLong("voteContentUid", voteContentUid.longValue()) - .list(); + List list = getSessionFactory().getCurrentSession() + .createQuery(LOAD_QUESTION_CONTENT_BY_DISPLAY_ORDER).setLong("displayOrder", displayOrder.longValue()) + .setLong("voteContentUid", voteContentUid.longValue()).list(); if (list != null && list.size() > 0) { - VoteQueContent voteq = (VoteQueContent) list.get(0); + VoteQueContent voteq = list.get(0); return voteq; } return null; @@ -82,8 +82,8 @@ @SuppressWarnings("unchecked") @Override public List getAllQuestionsSorted(final long voteContentId) { - List list = getSessionFactory().getCurrentSession().createQuery(SORT_QUESTION_CONTENT_BY_DISPLAY_ORDER) - .setLong("voteContentId", voteContentId).list(); + List list = getSessionFactory().getCurrentSession() + .createQuery(SORT_QUESTION_CONTENT_BY_DISPLAY_ORDER).setLong("voteContentId", voteContentId).list(); return list; } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java,v diff -u -r1.10.2.6 -r1.10.2.7 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java 19 Oct 2016 01:59:18 -0000 1.10.2.6 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java 19 Oct 2016 02:10:24 -0000 1.10.2.7 @@ -61,11 +61,11 @@ public VoteSession getSessionBySessionId(Long voteSessionId) { String query = "from VoteSession votes where votes.voteSessionId=?"; - List list = getSessionFactory().getCurrentSession().createQuery(query).setLong(0, voteSessionId.longValue()) - .list(); + List list = getSessionFactory().getCurrentSession().createQuery(query) + .setLong(0, voteSessionId.longValue()).list(); if (list != null && list.size() > 0) { - VoteSession vote = (VoteSession) list.get(0); + VoteSession vote = list.get(0); return vote; } return null; @@ -108,7 +108,7 @@ .setLong(0, voteSessionId.longValue()).list(); if (list != null && list.size() > 0) { - VoteSession vote = (VoteSession) list.get(0); + VoteSession vote = list.get(0); getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); getSession().delete(vote); getSession().flush(); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java,v diff -u -r1.12.2.5 -r1.12.2.6 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java 19 Oct 2016 01:59:48 -0000 1.12.2.5 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUserDAO.java 19 Oct 2016 02:10:45 -0000 1.12.2.6 @@ -49,10 +49,11 @@ public VoteQueUsr getUserByUserId(Long userId) { String query = "from VoteQueUsr user where user.queUsrId=?"; - List list = getSessionFactory().getCurrentSession().createQuery(query).setLong(0, userId.longValue()).list(); + List list = getSessionFactory().getCurrentSession().createQuery(query) + .setLong(0, userId.longValue()).list(); if (list != null && list.size() > 0) { - VoteQueUsr voteu = (VoteQueUsr) list.get(0); + VoteQueUsr voteu = list.get(0); return voteu; } return null; @@ -68,7 +69,7 @@ if (list != null && list.size() > 0) { Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { - VoteQueUsr user = (VoteQueUsr) listIterator.next(); + VoteQueUsr user = listIterator.next(); if (user.getVoteSession().getSessionStatus().equals("COMPLETED")) { ++completedSessionUserCount; } @@ -87,7 +88,7 @@ .setLong("queUsrId", queUsrId.longValue()).setLong("voteSessionId", voteSessionId.longValue()).list(); if (list != null && list.size() > 0) { - VoteQueUsr usr = (VoteQueUsr) list.get(0); + VoteQueUsr usr = list.get(0); return usr; } return null; @@ -98,10 +99,11 @@ public VoteQueUsr getVoteQueUsrById(long voteQueUsrId) { String query = "from VoteQueUsr user where user.queUsrId=?"; - List list = getSessionFactory().getCurrentSession().createQuery(query).setLong(0, voteQueUsrId).list(); + List list = getSessionFactory().getCurrentSession().createQuery(query).setLong(0, voteQueUsrId) + .list(); if (list != null && list.size() > 0) { - VoteQueUsr qu = (VoteQueUsr) list.get(0); + VoteQueUsr qu = list.get(0); return qu; } return null; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java,v diff -u -r1.40.2.8 -r1.40.2.9 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 19 Oct 2016 02:00:56 -0000 1.40.2.8 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 19 Oct 2016 02:11:05 -0000 1.40.2.9 @@ -100,8 +100,8 @@ @SuppressWarnings("unchecked") @Override public List getAttemptsForUser(final Long queUsrId) { - List list = getSessionFactory().getCurrentSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER) - .setLong("queUsrId", queUsrId.longValue()).list(); + List list = getSessionFactory().getCurrentSession() + .createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER).setLong("queUsrId", queUsrId.longValue()).list(); return list; } @@ -111,7 +111,7 @@ List list = getSessionFactory().getCurrentSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRIES) .setLong("voteContentUid", voteContentUid).list(); - Set userEntries = new HashSet(); + Set userEntries = new HashSet<>(); if ((list != null) && (list.size() > 0)) { Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { @@ -222,7 +222,7 @@ .createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_SESSION) .setLong("queUsrId", queUsrId.longValue()).setLong("sessionUid", sessionUid.longValue()).list(); - Set userEntries = new HashSet(); + Set userEntries = new HashSet<>(); if ((list != null) && (list.size() > 0)) { Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { @@ -249,8 +249,9 @@ @SuppressWarnings("unchecked") @Override public int getSessionEntriesCount(final Long voteSessionUid) { - List result = getSessionFactory().getCurrentSession().createQuery(VoteUsrAttemptDAO.COUNT_ENTRIES_BY_SESSION_ID) - .setLong("voteSessionUid", voteSessionUid).list(); + List result = getSessionFactory().getCurrentSession() + .createQuery(VoteUsrAttemptDAO.COUNT_ENTRIES_BY_SESSION_ID).setLong("voteSessionUid", voteSessionUid) + .list(); Long resultLong = result.get(0) != null ? (Long) result.get(0) : new Long(0); return resultLong.intValue(); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java,v diff -u -r1.2.2.3 -r1.2.2.4 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java 19 Oct 2016 02:05:06 -0000 1.2.2.3 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java 19 Oct 2016 02:12:24 -0000 1.2.2.4 @@ -52,8 +52,8 @@ protected String contentFolderID; protected String editableQuestionText; - // protected List attachmentList; - // protected List deletedAttachmentList; + // protected List attachmentList; + // protected List deletedAttachmentList; protected String reflect; protected String reflectionSubject; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java,v diff -u -r1.2.2.4 -r1.2.2.5 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java 11 May 2016 07:36:59 -0000 1.2.2.4 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java 19 Oct 2016 02:17:41 -0000 1.2.2.5 @@ -23,14 +23,14 @@ package org.lamsfoundation.lams.tool.vote.dto; import java.util.List; -import java.util.Map; +//import java.util.Map; /** * DTO that holds monitoring flow properties * * @author Ozgur Demirtas */ -public class VoteGeneralMonitoringDTO implements Comparable { +public class VoteGeneralMonitoringDTO implements Comparable { protected String requestLearningReport; protected String userExceptionNoToolSessions; protected String userExceptionContentInUse; @@ -48,16 +48,16 @@ // protected List listMonitoredAnswersContainerDto; protected List sessionDTOs; - protected Map mapStandardNominationsContent; - protected Map mapStandardNominationsHTMLedContent; - protected Map mapStandardRatesContent; - protected Map mapStandardUserCount; - protected Map mapStandardQuestionUid; - protected Map mapStandardToolSessionUid; + // protected Map mapStandardNominationsContent; + // protected Map mapStandardNominationsHTMLedContent; + // protected Map mapStandardRatesContent; + // protected Map mapStandardUserCount; + // protected Map mapStandardQuestionUid; + // protected Map mapStandardToolSessionUid; protected String sessionUserCount; protected String completedSessionUserCount; - protected List mapStudentsVoted; + // protected List mapStudentsVoted; protected String contentFolderID; @@ -226,112 +226,112 @@ this.sessionDTOs = sessionDTOs; } - /** - * @return Returns the mapStandardNominationsContent. - */ - public Map getMapStandardNominationsContent() { - return mapStandardNominationsContent; - } +// /** +// * @return Returns the mapStandardNominationsContent. +// */ +// public Map getMapStandardNominationsContent() { +// return mapStandardNominationsContent; +// } +// +// /** +// * @param mapStandardNominationsContent +// * The mapStandardNominationsContent to set. +// */ +// public void setMapStandardNominationsContent(Map mapStandardNominationsContent) { +// this.mapStandardNominationsContent = mapStandardNominationsContent; +// } - /** - * @param mapStandardNominationsContent - * The mapStandardNominationsContent to set. - */ - public void setMapStandardNominationsContent(Map mapStandardNominationsContent) { - this.mapStandardNominationsContent = mapStandardNominationsContent; - } +// /** +// * @return Returns the mapStandardNominationsHTMLedContent. +// */ +// public Map getMapStandardNominationsHTMLedContent() { +// return mapStandardNominationsHTMLedContent; +// } +// +// /** +// * @param mapStandardNominationsHTMLedContent +// * The mapStandardNominationsHTMLedContent to set. +// */ +// public void setMapStandardNominationsHTMLedContent(Map mapStandardNominationsHTMLedContent) { +// this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; +// } - /** - * @return Returns the mapStandardNominationsHTMLedContent. - */ - public Map getMapStandardNominationsHTMLedContent() { - return mapStandardNominationsHTMLedContent; - } +// /** +// * @return Returns the mapStandardQuestionUid. +// */ +// public Map getMapStandardQuestionUid() { +// return mapStandardQuestionUid; +// } +// +// /** +// * @param mapStandardQuestionUid +// * The mapStandardQuestionUid to set. +// */ +// public void setMapStandardQuestionUid(Map mapStandardQuestionUid) { +// this.mapStandardQuestionUid = mapStandardQuestionUid; +// } - /** - * @param mapStandardNominationsHTMLedContent - * The mapStandardNominationsHTMLedContent to set. - */ - public void setMapStandardNominationsHTMLedContent(Map mapStandardNominationsHTMLedContent) { - this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; - } +// /** +// * @return Returns the mapStandardRatesContent. +// */ +// public Map getMapStandardRatesContent() { +// return mapStandardRatesContent; +// } +// +// /** +// * @param mapStandardRatesContent +// * The mapStandardRatesContent to set. +// */ +// public void setMapStandardRatesContent(Map mapStandardRatesContent) { +// this.mapStandardRatesContent = mapStandardRatesContent; +// } - /** - * @return Returns the mapStandardQuestionUid. - */ - public Map getMapStandardQuestionUid() { - return mapStandardQuestionUid; - } +// /** +// * @return Returns the mapStandardToolSessionUid. +// */ +// public Map getMapStandardToolSessionUid() { +// return mapStandardToolSessionUid; +// } +// +// /** +// * @param mapStandardToolSessionUid +// * The mapStandardToolSessionUid to set. +// */ +// public void setMapStandardToolSessionUid(Map mapStandardToolSessionUid) { +// this.mapStandardToolSessionUid = mapStandardToolSessionUid; +// } - /** - * @param mapStandardQuestionUid - * The mapStandardQuestionUid to set. - */ - public void setMapStandardQuestionUid(Map mapStandardQuestionUid) { - this.mapStandardQuestionUid = mapStandardQuestionUid; - } +// /** +// * @return Returns the mapStandardUserCount. +// */ +// public Map getMapStandardUserCount() { +// return mapStandardUserCount; +// } +// +// /** +// * @param mapStandardUserCount +// * The mapStandardUserCount to set. +// */ +// public void setMapStandardUserCount(Map mapStandardUserCount) { +// this.mapStandardUserCount = mapStandardUserCount; +// } - /** - * @return Returns the mapStandardRatesContent. - */ - public Map getMapStandardRatesContent() { - return mapStandardRatesContent; - } +// /** +// * @param mapStudentsVoted +// * The mapStudentsVoted to set. +// */ +// public void setMapStudentsVoted(List mapStudentsVoted) { +// this.mapStudentsVoted = mapStudentsVoted; +// } +// +// /** +// * @return Returns the mapStudentsVoted. +// */ +// public List getMapStudentsVoted() { +// return mapStudentsVoted; +// } /** - * @param mapStandardRatesContent - * The mapStandardRatesContent to set. - */ - public void setMapStandardRatesContent(Map mapStandardRatesContent) { - this.mapStandardRatesContent = mapStandardRatesContent; - } - - /** - * @return Returns the mapStandardToolSessionUid. - */ - public Map getMapStandardToolSessionUid() { - return mapStandardToolSessionUid; - } - - /** - * @param mapStandardToolSessionUid - * The mapStandardToolSessionUid to set. - */ - public void setMapStandardToolSessionUid(Map mapStandardToolSessionUid) { - this.mapStandardToolSessionUid = mapStandardToolSessionUid; - } - - /** - * @return Returns the mapStandardUserCount. - */ - public Map getMapStandardUserCount() { - return mapStandardUserCount; - } - - /** - * @param mapStandardUserCount - * The mapStandardUserCount to set. - */ - public void setMapStandardUserCount(Map mapStandardUserCount) { - this.mapStandardUserCount = mapStandardUserCount; - } - - /** - * @param mapStudentsVoted - * The mapStudentsVoted to set. - */ - public void setMapStudentsVoted(List mapStudentsVoted) { - this.mapStudentsVoted = mapStudentsVoted; - } - - /** - * @return Returns the mapStudentsVoted. - */ - public List getMapStudentsVoted() { - return mapStudentsVoted; - } - - /** * @return Returns the responseId. */ public String getResponseId() {