01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/metaobj/tags/sakai_2-4-1/metaobj-api/api/src/java/org/sakaiproject/metaobj/shared/model/Type.java $
03: * $Id: Type.java 8052 2006-04-20 18:16:21Z ggolden@umich.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.metaobj.shared.model;
21:
22: import java.io.Serializable;
23:
24: /**
25: * Created by IntelliJ IDEA.
26: * User: jbush
27: * Date: Apr 29, 2004
28: * Time: 11:11:15 AM
29: * To change this template use File | Settings | File Templates.
30: */
31: public class Type implements Serializable {
32:
33: private Id id;
34: private String description;
35: private boolean systemOnly = false;
36:
37: public Type() {
38: }
39:
40: public Type(Id id) {
41: setId(id);
42: }
43:
44: public Type(Id id, String description) {
45: setDescription(description);
46: setId(id);
47: }
48:
49: public Type(Id id, String description, boolean systemOnly) {
50: setId(id);
51: this .description = description;
52: this .systemOnly = systemOnly;
53: }
54:
55: /**
56: * @return Returns the id.
57: */
58: public Id getId() {
59: return id;
60: }
61:
62: public void setId(Id id) {
63: this .id = id;
64: if (getDescription() == null) {
65: setDescription(id.getValue());
66: }
67: }
68:
69: public String getDescription() {
70: return description;
71: }
72:
73: public void setDescription(String description) {
74: this .description = description;
75: }
76:
77: public boolean isSystemOnly() {
78: return systemOnly;
79: }
80:
81: public void setSystemOnly(boolean systemOnly) {
82: this.systemOnly = systemOnly;
83: }
84:
85: }
|