2 * This file is part of NeverNote
\r
3 * Copyright 2009 Randy Baumgarte
\r
5 * This file may be licensed under the terms of of the
\r
6 * GNU General Public License Version 2 (the ``GPL'').
\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
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
21 package cx.fbn.nevernote.sql.requests;
\r
23 import java.util.ArrayList;
\r
24 import java.util.List;
\r
26 import cx.fbn.nevernote.sql.runners.DeletedItemRecord;
\r
28 public class DeletedItemRequest extends DBRunnerRequest {
\r
29 public static int Create_Table = 1;
\r
30 public static int Drop_Table = 2;
\r
31 public static int Add_Deleted_Item = 3;
\r
32 public static int Expunge_All = 4;
\r
33 public static int Get_All = 5;
\r
34 public static int Expunge_Record = 6;
\r
36 public volatile String string1;
\r
37 public volatile String string2;
\r
39 public List<DeletedItemRecord> responseDeletedRecords;
\r
41 public DeletedItemRequest() {
\r
42 category = DELETED_ITEM;
\r
45 public DeletedItemRequest copy() {
\r
46 DeletedItemRequest request = new DeletedItemRequest();
\r
48 request.requestor_id = requestor_id;
\r
49 request.type = type;
\r
50 request.category = category;
\r
52 if (string1 != null)
\r
53 request.string1 = new String(string1);
\r
54 if (string2 != null)
\r
55 request.string2 = new String(string2);
\r
57 if (responseDeletedRecords != null) {
\r
58 request.responseDeletedRecords = new ArrayList<DeletedItemRecord>();
\r
59 for (int i=0; i<responseDeletedRecords.size(); i++) {
\r
60 DeletedItemRecord record = new DeletedItemRecord();
\r
61 record.guid = new String(responseDeletedRecords.get(i).guid);
\r
62 record.type = new String(responseDeletedRecords.get(i).type);
\r
63 request.responseDeletedRecords.add(record);
\r