KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > exchange > items > common > model > Item


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

18
19 package sync4j.exchange.items.common.model;
20
21 import java.util.Date JavaDoc;
22
23 /**
24  * @author Fabio Maggi @ Funambol
25  *
26  * @version $Id: Item.java,v 1.5 2005/01/19 11:37:48 fabius Exp $
27  **/

28 public class Item {
29
30     //--------------------------------------------------------------- Constants
31

32     //------------------------------------------------------------ Private data
33

34     private String JavaDoc id = null ;
35     private String JavaDoc href = null ;
36
37     private Date JavaDoc creationDate = null ;
38     private Date JavaDoc lastModified = null ;
39
40     //------------------------------------------------------------ Constructors
41

42     /**
43      * Creates a Item
44      *
45      */

46     public Item () {
47
48     }
49
50     /**
51      * Creates a Item
52      *
53      * @param id
54      */

55     public Item (String JavaDoc id) {
56
57         this.id = id ;
58         this.href = null ;
59         this.creationDate = null ;
60         this.lastModified = null ;
61
62     }
63
64     /**
65      * Creates a Item
66      *
67      * @param id
68      * @param lastModified
69      *
70      */

71     public Item (String JavaDoc id,
72                  Date JavaDoc lastModified) {
73
74         this.id = id ;
75         this.href = null ;
76         this.creationDate = null ;
77         this.lastModified = lastModified ;
78
79     }
80
81     /**
82      * Creates a Item
83      *
84      * @param id
85      * @param href
86      * @param lastUpdate
87      *
88      */

89     public Item (String JavaDoc id ,
90                  String JavaDoc href ,
91                  String JavaDoc lastUpdate) {
92
93         this.id = id ;
94         this.href = null ;
95         this.lastModified = null ;
96
97     }
98
99     /**
100      * Creates a Item
101      *
102      * @param id
103      * @param creationDate
104      * @param lastModified
105      *
106      */

107     public Item (String JavaDoc id ,
108                  String JavaDoc href ,
109                  Date JavaDoc creationDate ,
110                  Date JavaDoc lastModified) {
111
112         this.id = id ;
113         this.href = href ;
114         this.creationDate = creationDate ;
115         this.lastModified = lastModified ;
116
117     }
118
119     //---------------------------------------------------------- Public methods
120

121     public String JavaDoc getId() {
122         return this.id;
123     }
124
125     public String JavaDoc getHref() {
126         return this.href;
127     }
128
129     public Date JavaDoc getCreationDate() {
130         return this.creationDate;
131     }
132
133     public Date JavaDoc getLastModified() {
134         return this.lastModified;
135     }
136
137     public void setId(String JavaDoc id) {
138         this.id = id;
139     }
140
141     public void setHref(String JavaDoc href) {
142         this.href = href;
143     }
144
145     public void setCreationDate(Date JavaDoc creationDate) {
146         this.creationDate = creationDate;
147     }
148
149     public void setLastModified(Date JavaDoc lastModified) {
150         this.lastModified = lastModified;
151     }
152
153 }
Popular Tags