OSDN Git Service

Fix handling of H2 lock files
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / requests / InvalidXMLRequest.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 import java.util.ArrayList;\r
23 import java.util.List;\r
24 \r
25 \r
26 public class InvalidXMLRequest extends DBRunnerRequest {\r
27         public static int Create_Table                                                  = 1;\r
28         public static int Drop_Table                                                    = 2;\r
29         public static int Get_Invalid_Elements                                  = 3;\r
30         public static int Get_Invalid_Attributes                                = 4;\r
31         public static int Get_Invalid_Attribute_Elements                = 5;\r
32         public static int Add_Invalid_Element                                   = 6;\r
33         public static int Add_Invalid_Attribute                                 = 7;\r
34 \r
35 \r
36         public volatile String          string1;\r
37         public volatile String          string2;\r
38         public volatile String          string3;\r
39         \r
40         public String responseString1;\r
41         public List<String> responseList;\r
42         public ArrayList<String> responseArrayList;\r
43         \r
44         public InvalidXMLRequest() {\r
45                 category = Invalid_XML;\r
46         }\r
47         \r
48         public InvalidXMLRequest copy() {\r
49                 InvalidXMLRequest req = new InvalidXMLRequest();\r
50                 req.type = type;\r
51                 req.category = category;\r
52                 req.requestor_id = requestor_id;\r
53                 \r
54                 if (string1  != null)\r
55                         req.string1 = new String(string1);\r
56                 if (string2  != null)\r
57                         req.string2 = new String(string2);\r
58                 if (string3  != null)\r
59                         req.string3 = new String(string3);\r
60                 if (responseString1  != null)\r
61                         req.responseString1 = new String(responseString1);\r
62                 \r
63                 if (responseList != null) {\r
64                         req.responseList = new ArrayList<String>();\r
65                         for (int i=0; i<responseList.size(); i++) {\r
66                                 req.responseList.add(new String(responseList.get(i)));\r
67                         }\r
68                 }\r
69                 \r
70                 if (responseArrayList != null) {\r
71                         req.responseArrayList = new ArrayList<String>();\r
72                         for (int i=0; i<responseArrayList.size(); i++) {\r
73                                 req.responseArrayList.add(new String(responseArrayList.get(i)));\r
74                         }\r
75                 }\r
76 \r
77                 return req;\r
78         }\r
79         \r
80 }