01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/tags/sakai_2-4-1/samigo-hibernate/src/java/org/sakaiproject/tool/assessment/data/dao/questionpool/QuestionPoolAccessData.java $
03: * $Id: QuestionPoolAccessData.java 9273 2006-05-10 22:34:28Z daisyf@stanford.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the"License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.tool.assessment.data.dao.questionpool;
21:
22: import java.io.Serializable;
23:
24: /**
25: * DOCUMENTATION PENDING
26: *
27: * @author $author$
28: * @version $Id: QuestionPoolAccessData.java 9273 2006-05-10 22:34:28Z daisyf@stanford.edu $
29: */
30: public class QuestionPoolAccessData implements Serializable {
31: /** Use serialVersionUID for interoperability. */
32: private final static long serialVersionUID = 9180085666292824370L;
33:
34: private Long questionPoolId;
35: private String agentId;
36: private Long accessTypeId;
37:
38: public QuestionPoolAccessData() {
39: }
40:
41: public QuestionPoolAccessData(Long questionPoolId, String agentId,
42: Long accessTypeId) {
43: this .questionPoolId = questionPoolId;
44: this .agentId = agentId;
45: this .accessTypeId = accessTypeId;
46: }
47:
48: public Long getQuestionPoolId() {
49: return questionPoolId;
50: }
51:
52: public void setQuestionPoolId(Long questionPoolId) {
53: this .questionPoolId = questionPoolId;
54: }
55:
56: public String getAgentId() {
57: return agentId;
58: }
59:
60: public void setAgentId(String agentId) {
61: this .agentId = agentId;
62: }
63:
64: public Long getAccessTypeId() {
65: return accessTypeId;
66: }
67:
68: public void setAccessTypeId(Long accessTypeId) {
69: this .accessTypeId = accessTypeId;
70: }
71:
72: public boolean equals(Object questionPoolAccess) {
73: boolean returnValue = false;
74: if (this == questionPoolAccess)
75: returnValue = true;
76: if (questionPoolAccess != null
77: && questionPoolAccess.getClass() == this .getClass()) {
78: QuestionPoolAccessData qpi = (QuestionPoolAccessData) questionPoolAccess;
79: if ((this .getAccessTypeId()).equals(qpi.getAccessTypeId())
80: && (this .getAgentId()).equals(qpi.getAgentId())
81: && (this .getQuestionPoolId()).equals(qpi
82: .getQuestionPoolId()))
83: returnValue = true;
84: }
85: return returnValue;
86: }
87:
88: public int hashCode() {
89: String s = this .agentId + ":"
90: + (this .questionPoolId).toString() + ":"
91: + (this.accessTypeId).toString();
92: return (s.hashCode());
93: }
94: }
|