OSDN Git Service

NeverNote 0.88.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / requests / SyncRequest.java
1 /*\r
2  * This file is part of NeverNote \r
3  * Copyright 2009 Randy Baumgarte\r
4  * \r
5  * This file may be licensed under the terms of of the\r
6  * GNU General Public License Version 2 (the ``GPL'').\r
7  *\r
8  * Software distributed under the License is distributed\r
9  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either\r
10  * express or implied. See the GPL for the specific language\r
11  * governing rights and limitations.\r
12  *\r
13  * You should have received a copy of the GPL along with this\r
14  * program. If not, go to http://www.gnu.org/licenses/gpl.html\r
15  * or write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
17  *\r
18 */\r
19 \r
20 package cx.fbn.nevernote.sql.requests;\r
21 \r
22 \r
23 \r
24 public class SyncRequest extends DBRunnerRequest {\r
25         public static int Create_Table                                                  = 1;\r
26         public static int Drop_Table                                                    = 2;\r
27         public static int Set_Record                                                    = 3;\r
28         public static int Get_Record                                                    = 4;\r
29 \r
30 \r
31         public volatile int                     int1;\r
32         public volatile long            long1;\r
33         public volatile String          key;\r
34         public volatile String          value;\r
35         \r
36         public String responseValue;\r
37         \r
38         public SyncRequest() {\r
39                 category = Sync;\r
40         }\r
41         \r
42         public SyncRequest copy() {\r
43                 SyncRequest req = new SyncRequest();\r
44                 req.type = type;\r
45                 req.category = category;\r
46                 req.requestor_id = requestor_id;\r
47                 \r
48                 req.int1 = int1;\r
49                 req.long1 = long1;\r
50                 if (key != null) \r
51                         req.key = new String(key);\r
52                 if (value != null) \r
53                         req.value = new String(value);\r
54                 if (responseValue != null) \r
55                         req.responseValue = new String(responseValue);\r
56 \r
57                 return req;\r
58         }\r
59         \r
60 }