KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > syncclient > spds > engine > SyncItemProperty


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.syncclient.spds.engine;
20
21 /**
22  * Represents a property (a piece of information) of a <i>SyncItem</i>.
23  *
24  * @author Fabio Maggi
25  *
26  * @version Stefano Fornari
27  */

28 public class SyncItemProperty {
29
30     // -------------------------------------------------------------- Properties
31

32     /**
33      * The property name
34      */

35     private String JavaDoc name = null;
36     public String JavaDoc getName(){
37         return this.name;
38     }
39
40     public void setName(String JavaDoc name){
41         this.name = name;
42     }
43
44     /**
45      * The property type
46      */

47     private String JavaDoc type = null;
48     public String JavaDoc getType(){
49         return type;
50     }
51
52     public void setType(String JavaDoc type){
53         this.type = type;
54     }
55
56     /**
57      * Is the property a key?
58      */

59     private boolean key = false;
60     public boolean isKey(){
61         return key;
62     }
63
64     /**
65      * The property value
66      */

67     private Object JavaDoc value = null;
68     public Object JavaDoc getValue(){
69         return value;
70     }
71
72     public void setValue(Object JavaDoc value){
73         this.value = value;
74     }
75
76     // ------------------------------------------------------------- Contructors
77

78     public SyncItemProperty(String JavaDoc name, Object JavaDoc value) {
79         this(name, value, value.getClass().getName());
80     }
81
82     public SyncItemProperty(String JavaDoc name, Object JavaDoc value, String JavaDoc type) {
83         this.name = name;
84         this.value = value;
85         this.type = type;
86     }
87 }
Popular Tags