01: /**********************************************************************************
02: *
03: * $Id: GradebookProperty.java 9202 2006-05-09 20:57:37Z ray@media.berkeley.edu $
04: *
05: ***********************************************************************************
06: *
07: * Copyright (c) 2006 The Regents of the University of California
08: *
09: * Licensed under the Educational Community License, Version 1.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.opensource.org/licenses/ecl1.php
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: *
21: **********************************************************************************/package org.sakaiproject.tool.gradebook;
22:
23: import java.io.Serializable;
24:
25: import org.apache.commons.lang.builder.ToStringBuilder;
26:
27: public class GradebookProperty implements Serializable, Comparable {
28: private Long id;
29: private int version;
30:
31: private String name;
32: private String value;
33:
34: public GradebookProperty() {
35: }
36:
37: public GradebookProperty(String name) {
38: setName(name);
39: }
40:
41: public String getName() {
42: return name;
43: }
44:
45: public void setName(String name) {
46: this .name = name;
47: }
48:
49: public String getValue() {
50: return value;
51: }
52:
53: public void setValue(String value) {
54: this .value = value;
55: }
56:
57: public int compareTo(Object o) {
58: return getName().compareTo(((GradebookProperty) o).getName());
59: }
60:
61: public String toString() {
62: return new ToStringBuilder(this ).append(getName()).toString();
63: }
64:
65: public Long getId() {
66: return id;
67: }
68:
69: public void setId(Long id) {
70: this .id = id;
71: }
72:
73: public int getVersion() {
74: return version;
75: }
76:
77: public void setVersion(int version) {
78: this.version = version;
79: }
80: }
|