OSDN Git Service

940a833b06ae3839b306295020dc58dcba4945ce
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / requests / DatabaseRequest.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 public class DatabaseRequest extends DBRunnerRequest {\r
24         public static int Create_Tables                         = 1;\r
25         public static int Drop_Tables                           = 2;\r
26         public static int Setup                                         = 3;\r
27         public static int Shutdown                                      = 4;\r
28         public static int Compact                                       = 5;\r
29         public static int Execute_Sql               = 6;\r
30         public static int Execute_Sql_Index                     = 7;\r
31         public static int Backup_Database                       = 8;\r
32 \r
33         public volatile String                  string1;\r
34         public volatile String                  string2;\r
35         public volatile int                     int1;\r
36         public volatile long                    long1;\r
37         \r
38         public DatabaseRequest() {\r
39                 category = DATABASE;\r
40         }\r
41         \r
42         public DatabaseRequest copy() {\r
43                 DatabaseRequest request = new DatabaseRequest();\r
44                 \r
45                 request.requestor_id = requestor_id;\r
46                 request.type = type;\r
47                 request.category = category;\r
48                 request.long1 = long1;\r
49                 request.int1 = int1;\r
50                 if (string1 != null)\r
51                         request.string1 = new String(string1);\r
52                 if (string2 != null)\r
53                         request.string2 = new String(string2);\r
54                 \r
55                 return request;\r
56         }\r
57         \r
58 }