1
22
23 package com.liferay.portal.kernel.search.messaging;
24
25 import com.liferay.portal.kernel.search.Document;
26 import com.liferay.portal.kernel.search.Sort;
27
28
34 public class SearchRequest {
35
36 public static final String COMMAND_ADD = "ADD";
37
38 public static final String COMMAND_DELETE = "DELETE";
39
40 public static final String COMMAND_DELETE_PORTLET_DOCS =
41 "DELETE_PORTLET_DOCS";
42
43 public static final String COMMAND_INDEX_ONLY = "INDEX_ONLY";
44
45 public static final String COMMAND_SEARCH = "SEARCH";
46
47 public static final String COMMAND_UPDATE = "UPDATE";
48
49 public SearchRequest() {
50 }
51
52 public SearchRequest(String command) {
53 this(command, 0, (String)null);
54 }
55
56 public SearchRequest(String command, long companyId, String id) {
57 this(command, companyId, id, null);
58 }
59
60 public SearchRequest(String command, long companyId, Document doc) {
61 this(command, companyId, null, doc);
62 }
63
64 public SearchRequest(
65 String command, long companyId, String id, Document doc) {
66
67 this(command, companyId, id, doc, null, null, 0, 0);
68 }
69
70 public SearchRequest(
71 String command, long companyId, String query, Sort sort, int start,
72 int end) {
73
74 this(command, companyId, null, null, query, sort, start, end);
75 }
76
77 public SearchRequest(
78 String command, long companyId, String id, Document doc, String query,
79 Sort sort, int start, int end) {
80
81 _command = command;
82 _companyId = companyId;
83 _id = id;
84 _doc = doc;
85 _query = query;
86 _sort = sort;
87 _start = start;
88 _end = end;
89 }
90
91 public String getCommand() {
92 return _command;
93 }
94
95 public void setCommand(String command) {
96 _command = command;
97 }
98
99 public long getCompanyId() {
100 return _companyId;
101 }
102
103 public void setCompanyId(long companyId) {
104 _companyId = companyId;
105 }
106
107 public String getId() {
108 return _id;
109 }
110
111 public void setId(String id) {
112 _id = id;
113 }
114
115 public Document getDocument() {
116 return _doc;
117 }
118
119 public void setDocument(Document doc) {
120 _doc = doc;
121 }
122
123 public String getQuery() {
124 return _query;
125 }
126
127 public void setQuery(String query) {
128 _query = query;
129 }
130
131 public Sort getSort() {
132 return _sort;
133 }
134
135 public void setSort(Sort sort) {
136 _sort = sort;
137 }
138
139 public int getStart() {
140 return _start;
141 }
142
143 public void setStart(int start) {
144 _start = start;
145 }
146
147 public int getEnd() {
148 return _end;
149 }
150
151 public void setEnd(int end) {
152 _end = end;
153 }
154
155 private String _command;
156 private long _companyId;
157 private String _id;
158 private Document _doc;
159 private String _query;
160 private Sort _sort;
161 private int _start;
162 private int _end;
163
164 }