01: /**********************************************************************************
02: * $URL: $
03: * $Id: $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006,2007 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.poll.model;
21:
22: import java.util.List;
23:
24: import org.sakaiproject.id.cover.IdManager;
25:
26: public class VoteCollectionImpl implements VoteCollection {
27:
28: private String id;
29: private List votes;
30: private Long pollId;
31: public String[] optionsSelected;
32: public String option;
33: private String submittionStatus;
34:
35: public VoteCollectionImpl() {
36: //need a new id here
37: String tid = IdManager.createUuid();
38: id = tid;
39: }
40:
41: public void setId(String value) {
42: id = value;
43:
44: }
45:
46: public String getId() {
47: return id;
48: }
49:
50: public void setVotes(List rvotes) {
51: votes = rvotes;
52:
53: }
54:
55: public List getVotes() {
56:
57: return votes;
58: }
59:
60: public void setPollId(Long pid) {
61: this .pollId = pid;
62: }
63:
64: public Long getPollId() {
65: return this .pollId;
66: }
67:
68: public void setOption(String s) {
69: this .option = s;
70: }
71:
72: public String getOption() {
73: return option;
74: }
75:
76: public void setOptionsSelected(String[] s) {
77: this .optionsSelected = s;
78: }
79:
80: public String[] getOptionsSelected() {
81: return this .optionsSelected;
82: }
83:
84: public void setSubmissionStatus(String s) {
85: this .submittionStatus = s;
86: }
87:
88: public String getSubmissionStatus() {
89: return this.submittionStatus;
90: }
91: }
|