KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > exchange > items > contact > model > Contact


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.contact.model;
20
21 import java.util.StringTokenizer JavaDoc;
22 import java.util.Date JavaDoc;
23 import java.text.MessageFormat JavaDoc;
24 import java.text.ParseException JavaDoc;
25
26 import sync4j.exchange.items.contact.ContactParseException;
27 import sync4j.exchange.xml.XmlParser;
28 import sync4j.exchange.xml.XmlParseException;
29
30 /**
31  * @author Fabio Maggi @ Funambol
32  *
33  * @version $Id: Contact.java,v 1.13 2005/06/20 14:04:16 fabius Exp $
34  **/

35
36 public class Contact
37 extends sync4j.foundation.pdi.contact.Contact {
38
39     //--------------------------------------------------------------------- Constants
40

41     //--------------------------------------------------------------------- Private data
42

43     private String JavaDoc id = null ;
44     private String JavaDoc userId = null ;
45
46     private String JavaDoc href = null ;
47
48     private Date JavaDoc lastUpdate = null ;
49     private char status = ' ' ;
50
51     //------------------------------------------------------------ Constructors
52

53     /**
54      * Creates a Contact
55      *
56      */

57     public Contact () {
58
59     }
60
61     /**
62      * Creates a Contact
63      *
64      *
65      * @param id client item id
66      *
67      */

68     public Contact (String JavaDoc id) {
69
70         this.id = id ;
71
72     }
73
74     /**
75      * Creates a Contact
76      *
77      *
78      * @param id client item id
79      * @param t client item timestamp
80      *
81      */

82     public Contact (String JavaDoc id, Date JavaDoc t) {
83
84         this.id = id ;
85         this.lastUpdate = t ;
86
87     }
88
89     /**
90      * Creates a Contact
91      *
92      *
93      * @param id client item id
94      * @param status client item status
95      *
96      */

97     public Contact (String JavaDoc id, char status) {
98
99         this.id = id ;
100         this.status = status ;
101
102     }
103
104     /**
105      * Creates a Contact
106      *
107      *
108      * @param id client item id
109      * @param state client item state
110      *
111      */

112     public Contact (String JavaDoc id ,
113                     String JavaDoc href ,
114                     char status ,
115                     Date JavaDoc lastUpdate ) {
116
117         this.id = id ;
118         this.href = href ;
119         this.status = status ;
120         this.lastUpdate = lastUpdate ;
121
122     }
123
124
125     //----------------------------------------------------------------------- Public methods
126

127
128     public String JavaDoc getId() {
129         return this.id;
130     }
131
132     public void setId(String JavaDoc id) {
133         this.id = id;
134     }
135
136     public String JavaDoc getUserId() {
137         return this.userId;
138     }
139
140     public Date JavaDoc getLastUpdate() {
141         return this.lastUpdate;
142     }
143
144     public char getStatus() {
145         return this.status;
146     }
147
148     public void setLastUpdate(Date JavaDoc lastUpdate) {
149         this.lastUpdate = lastUpdate;
150     }
151
152     public void setStatus(char status) {
153         this.status = status;
154     }
155
156     public String JavaDoc getHref() {
157         return this.href;
158     }
159
160     public void setHref(String JavaDoc href) {
161         this.href = href;
162     }
163
164
165 }
Popular Tags