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
20 package cx.fbn.nevernote.sql.requests;
\r
22 import java.util.ArrayList;
\r
23 import java.util.List;
\r
25 import com.evernote.edam.type.Note;
\r
26 import com.evernote.edam.type.Tag;
\r
29 public class EnSearchRequest extends DBRunnerRequest {
\r
30 public volatile String string1;
\r
31 public volatile List<Tag> tags;
\r
32 public volatile int int1;
\r
33 public volatile int int2;
\r
34 public volatile List<Note> responseNotes;
\r
35 public volatile List<String> responseStrings;
\r
38 public EnSearchRequest() {
\r
39 category = ENSEARCH;
\r
42 public EnSearchRequest copy() {
\r
43 EnSearchRequest request = new EnSearchRequest();
\r
45 request.requestor_id = requestor_id;
\r
46 request.type = type;
\r
47 request.int1 = int1;
\r
48 request.int2 = int2;
\r
49 request.category = category;
\r
50 if (string1 != null)
\r
51 request.string1 = new String(string1);
\r
53 request.tags = new ArrayList<Tag>();
\r
54 for (int i=0; i<tags.size(); i++)
\r
55 request.tags.add(tags.get(i).deepCopy());
\r
58 if (responseNotes != null) {
\r
59 request.responseNotes = new ArrayList<Note>();
\r
60 for (int i=0; i<responseNotes.size(); i++) {
\r
61 request.responseNotes.add(responseNotes.get(i).deepCopy());
\r
65 if (responseStrings != null) {
\r
66 request.responseStrings = new ArrayList<String>();
\r
67 for (int i=0; i<responseStrings.size(); i++) {
\r
68 request.responseStrings.add(new String(responseStrings.get(i)));
\r