KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lucane > applications > todolist > Todolist


1 /*
2  * Lucane - a collaborative platform
3  * Copyright (C) 2004 Jonathan Riboux <jonathan.riboux@wanadoo.Fr>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package org.lucane.applications.todolist;
21
22 import java.io.Serializable JavaDoc;
23
24 public class Todolist implements Serializable JavaDoc {
25     private int id;
26     private String JavaDoc userName;
27     private String JavaDoc name;
28     private String JavaDoc comment;
29     private boolean readOnly;
30     
31     public Todolist(String JavaDoc userName, String JavaDoc name, String JavaDoc comment) {
32         this(-1, userName, name, comment);
33     }
34
35     public Todolist(int id, String JavaDoc userName, String JavaDoc name, String JavaDoc comment) {
36         this(id, userName, name, comment, false);
37     }
38     
39     public Todolist(int id, String JavaDoc userName, String JavaDoc name, String JavaDoc comment, boolean readOnly) {
40         this.id = id;
41         this.userName = userName;
42         this.name = name;
43         this.comment = comment;
44         this.readOnly = readOnly;
45     }
46
47     public int getId() {
48         return id;
49     }
50     public String JavaDoc getUserName() {
51         return userName;
52     }
53     public String JavaDoc getComment() {
54         return comment;
55     }
56     public String JavaDoc getName() {
57         return name;
58     }
59     public boolean isReadOnly() {
60         return readOnly;
61     }
62
63     public void setId(int i) {
64         id = i;
65     }
66     public void setUserName(String JavaDoc string) {
67         userName = string;
68     }
69     public void setComment(String JavaDoc string) {
70         comment = string;
71     }
72     public void setName(String JavaDoc string) {
73         name = string;
74     }
75     public String JavaDoc toString() {
76         return getName();
77     }
78 }
79
Popular Tags