01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.cocoon.samples.tour.beans;
19:
20: import java.util.Date;
21:
22: /** Comments attached to a TaskBean
23: */
24:
25: public class TaskCommentBean {
26: private final int m_id;
27: public static int m_idCounter;
28:
29: public TaskCommentBean() {
30: synchronized (TaskBean.class) {
31: m_id = ++m_idCounter;
32: }
33: }
34:
35: public String toString() {
36: return "TaskCommentBean #" + m_id + " (" + m_date + ","
37: + m_comment + ")";
38: }
39:
40: public int getId() {
41: return m_id;
42: }
43:
44: public Date getDate() {
45: return m_date;
46: }
47:
48: public void setDate(Date m_date) {
49: this .m_date = m_date;
50: }
51:
52: public String getComment() {
53: return m_comment;
54: }
55:
56: public void setComment(String m_comment) {
57: this .m_comment = m_comment;
58: }
59:
60: private Date m_date;
61: private String m_comment;
62: }
|