01: // Copyright 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry.integration.app1.data;
16:
17: import java.io.Serializable;
18:
19: public class ToDoItem implements Serializable, Cloneable {
20: private static final long serialVersionUID = 329624498668043734L;
21:
22: private long _id;
23:
24: private String _title;
25:
26: private int _order;
27:
28: private Urgency _urgency = Urgency.MEDIUM;
29:
30: @Override
31: public String toString() {
32: return String.format("ToDoItem[%d %s]", _id, _title);
33: }
34:
35: @Override
36: public ToDoItem clone() {
37: try {
38: return (ToDoItem) super .clone();
39: } catch (CloneNotSupportedException ex) {
40: throw new RuntimeException(ex);
41: }
42: }
43:
44: public long getId() {
45: return _id;
46: }
47:
48: public void setId(long id) {
49: _id = id;
50: }
51:
52: public String getTitle() {
53: return _title;
54: }
55:
56: public void setTitle(String title) {
57: _title = title;
58: }
59:
60: public Urgency getUrgency() {
61: return _urgency;
62: }
63:
64: public void setUrgency(Urgency urgency) {
65: _urgency = urgency;
66: }
67:
68: public int getOrder() {
69: return _order;
70: }
71:
72: public void setOrder(int order) {
73: _order = order;
74: }
75:
76: }
|