1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
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.Query;
27  import com.liferay.portal.kernel.search.Sort;
28  
29  /**
30   * <a href="SearchRequest.java.html"><b><i>View Source</i></b></a>
31   *
32   * @author Bruno Farache
33   *
34   */
35  public class SearchRequest {
36  
37      public static final String COMMAND_ADD = "ADD";
38  
39      public static final String COMMAND_DELETE = "DELETE";
40  
41      public static final String COMMAND_DELETE_PORTLET_DOCS =
42          "DELETE_PORTLET_DOCS";
43  
44      public static final String COMMAND_INDEX_ONLY = "INDEX_ONLY";
45  
46      public static final String COMMAND_SEARCH = "SEARCH";
47  
48      public static final String COMMAND_UPDATE = "UPDATE";
49  
50      public SearchRequest() {
51      }
52  
53      public String getCommand() {
54          return _command;
55      }
56  
57      public void setCommand(String command) {
58          _command = command;
59      }
60  
61      public long getCompanyId() {
62          return _companyId;
63      }
64  
65      public void setCompanyId(long companyId) {
66          _companyId = companyId;
67      }
68  
69      public String getId() {
70          return _id;
71      }
72  
73      public void setId(String id) {
74          _id = id;
75      }
76  
77      public Document getDocument() {
78          return _doc;
79      }
80  
81      public void setDocument(Document doc) {
82          _doc = doc;
83      }
84  
85      public Query getQuery() {
86          return _query;
87      }
88  
89      public void setQuery(Query query) {
90          _query = query;
91      }
92  
93      public Sort getSort() {
94          return _sort;
95      }
96  
97      public void setSort(Sort sort) {
98          _sort = sort;
99      }
100 
101     public int getStart() {
102         return _start;
103     }
104 
105     public void setStart(int start) {
106         _start = start;
107     }
108 
109     public int getEnd() {
110         return _end;
111     }
112 
113     public void setEnd(int end) {
114         _end = end;
115     }
116 
117     private String _command;
118     private long _companyId;
119     private String _id;
120     private Document _doc;
121     private Query _query;
122     private Sort _sort;
123     private int _start;
124     private int _end;
125 
126 }