📄 testdata.java
字号:
/* * SchoolEJB - CyberDemia's library of EJBs for educational related services. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.school;import java.io.Serializable;/** * * TestData is a data transfer object to transfer a test's data to the client. * The questions of the test are treated as "related resources". * All questions not assigned to this test are treated as "unrelated resources". * * @author Alexander Yap */public class TestData implements Serializable{ public TestData() { // Nothing here } public TestData(Integer id, String name, IHierarchy owner, String ownerHierId, double passPercentage, int timeLimitSeconds, boolean multiQuestionsMode, boolean suppressQuesFeedback, boolean suppressTestEndFeedback, boolean canDeactivate) { m_id = id; m_name = name; m_owner = owner; m_ownerHierId = ownerHierId; m_passPercentage = passPercentage; m_multiQuestionsMode = multiQuestionsMode; m_suppressQuesFeedback = suppressQuesFeedback; m_suppressTestEndFeedback = suppressTestEndFeedback; m_timeLimitSeconds = timeLimitSeconds; m_canDeactivate = canDeactivate; } public Integer getId() { return m_id; } public String getOwnerHierId() { return m_ownerHierId; } public IHierarchy getOwner() { return m_owner; } public double getPassPercentage() { return m_passPercentage; } public String getName() { return m_name; } public void setUnrelatedResources( ResourceListData[] resources) { m_unrelatedResources = resources; } /** * Gets data of all unrelated resources (questions not assigned to the test). * @return Array of ResourceListData instances. */ public ResourceListData[] getUnrelatedResources() { return m_unrelatedResources; } public int getUnrelatedResourcesCount() { if (m_unrelatedResources == null) return 0; return m_unrelatedResources.length; } public void setRelatedResources( ResourceListData[] resources) { m_relatedResources = resources; } /** * Gets data of all related resources (questions assigned to the test). * @return Array of ResourceListData instances. */ public ResourceListData[] getRelatedResources() { return m_relatedResources; } /** * Gets number of questions assigned to the test. * @return Number of questions assigned to the test. */ public int getRelatedResourcesCount() { if (m_relatedResources == null) return 0; return m_relatedResources.length; } public void setResourceIdsToAdd(Integer[] resourceIds) { m_resourceIdsToAdd = resourceIds; } public Integer[] getResourceIdsToAdd() { return m_resourceIdsToAdd; } public void setResourceIdsToRemove(Integer[] resourceIds) { m_resourceIdsToRemove = resourceIds; } public Integer[] getResourceIdsToRemove() { return m_resourceIdsToRemove; } public int getTimeLimitSeconds() { return m_timeLimitSeconds; } public boolean isMultiQuestionsMode() { return m_multiQuestionsMode; } public boolean isSuppressQuestionFeedback() { return m_suppressQuesFeedback; } public boolean isSuppressTestEndFeedback() { return m_suppressTestEndFeedback; } public boolean isCanDeactivate() { return m_canDeactivate; } private Integer m_id = null; private String m_name = null; private String m_ownerHierId = null; private IHierarchy m_owner = null; private double m_passPercentage; private boolean m_multiQuestionsMode; private boolean m_suppressQuesFeedback; private boolean m_suppressTestEndFeedback; private int m_timeLimitSeconds; private boolean m_canDeactivate = false; private ResourceListData[] m_relatedResources = null; private ResourceListData[] m_unrelatedResources = null; private Integer[] m_resourceIdsToAdd = null; private Integer[] m_resourceIdsToRemove = null; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -