View Javadoc
1   /*
2    * Copyright 2012-2020 CodeLibs Project and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.codelibs.fess.entity;
17  
18  import java.util.List;
19  import java.util.Map;
20  
21  import org.codelibs.fess.util.FacetResponse;
22  
23  public class SearchRenderData {
24  
25      protected List<Map<String, Object>> documentItems;
26  
27      protected FacetResponse facetResponse;
28  
29      protected String appendHighlightParams;
30  
31      protected String execTime;
32  
33      protected int pageSize;
34  
35      protected int currentPageNumber;
36  
37      protected long allRecordCount;
38  
39      protected String allRecordCountRelation;
40  
41      protected int allPageCount;
42  
43      protected boolean existNextPage;
44  
45      protected boolean existPrevPage;
46  
47      protected long currentStartRecordNumber;
48  
49      protected long currentEndRecordNumber;
50  
51      protected List<String> pageNumberList;
52  
53      protected boolean partialResults;
54  
55      protected String searchQuery;
56  
57      protected long queryTime;
58  
59      protected long requestedTime;
60  
61      protected String queryId;
62  
63      public void setDocumentItems(final List<Map<String, Object>> documentItems) {
64          this.documentItems = documentItems;
65      }
66  
67      public void setFacetResponse(final FacetResponse facetResponse) {
68          this.facetResponse = facetResponse;
69      }
70  
71      public void setAppendHighlightParams(final String appendHighlightParams) {
72          this.appendHighlightParams = appendHighlightParams;
73      }
74  
75      public void setExecTime(final String execTime) {
76          this.execTime = execTime;
77      }
78  
79      public void setPageSize(final int pageSize) {
80          this.pageSize = pageSize;
81      }
82  
83      public void setCurrentPageNumber(final int currentPageNumber) {
84          this.currentPageNumber = currentPageNumber;
85      }
86  
87      public void setAllRecordCount(final long allRecordCount) {
88          this.allRecordCount = allRecordCount;
89      }
90  
91      public void setAllRecordCountRelation(final String allRecordCountRelation) {
92          this.allRecordCountRelation = allRecordCountRelation;
93      }
94  
95      public void setAllPageCount(final int allPageCount) {
96          this.allPageCount = allPageCount;
97      }
98  
99      public void setExistNextPage(final boolean existNextPage) {
100         this.existNextPage = existNextPage;
101     }
102 
103     public void setExistPrevPage(final boolean existPrevPage) {
104         this.existPrevPage = existPrevPage;
105     }
106 
107     public void setCurrentStartRecordNumber(final long currentStartRecordNumber) {
108         this.currentStartRecordNumber = currentStartRecordNumber;
109     }
110 
111     public void setCurrentEndRecordNumber(final long currentEndRecordNumber) {
112         this.currentEndRecordNumber = currentEndRecordNumber;
113     }
114 
115     public void setPageNumberList(final List<String> pageNumberList) {
116         this.pageNumberList = pageNumberList;
117     }
118 
119     public void setPartialResults(final boolean partialResults) {
120         this.partialResults = partialResults;
121     }
122 
123     public void setQueryTime(final long queryTime) {
124         this.queryTime = queryTime;
125     }
126 
127     public void setSearchQuery(final String searchQuery) {
128         this.searchQuery = searchQuery;
129     }
130 
131     public void setRequestedTime(final long requestedTime) {
132         this.requestedTime = requestedTime;
133     }
134 
135     public void setQueryId(final String queryId) {
136         this.queryId = queryId;
137     }
138 
139     public List<Map<String, Object>> getDocumentItems() {
140         return documentItems;
141     }
142 
143     public FacetResponse getFacetResponse() {
144         return facetResponse;
145     }
146 
147     public String getAppendHighlightParams() {
148         return appendHighlightParams;
149     }
150 
151     public String getExecTime() {
152         return execTime;
153     }
154 
155     public int getPageSize() {
156         return pageSize;
157     }
158 
159     public int getCurrentPageNumber() {
160         return currentPageNumber;
161     }
162 
163     public long getAllRecordCount() {
164         return allRecordCount;
165     }
166 
167     public String getAllRecordCountRelation() {
168         return allRecordCountRelation;
169     }
170 
171     public int getAllPageCount() {
172         return allPageCount;
173     }
174 
175     public boolean isExistNextPage() {
176         return existNextPage;
177     }
178 
179     public boolean isExistPrevPage() {
180         return existPrevPage;
181     }
182 
183     public long getCurrentStartRecordNumber() {
184         return currentStartRecordNumber;
185     }
186 
187     public long getCurrentEndRecordNumber() {
188         return currentEndRecordNumber;
189     }
190 
191     public List<String> getPageNumberList() {
192         return pageNumberList;
193     }
194 
195     public boolean isPartialResults() {
196         return partialResults;
197     }
198 
199     public String getSearchQuery() {
200         return searchQuery;
201     }
202 
203     public long getQueryTime() {
204         return queryTime;
205     }
206 
207     public long getRequestedTime() {
208         return requestedTime;
209     }
210 
211     public String getQueryId() {
212         return queryId;
213     }
214 
215     @Override
216     public String toString() {
217         return "SearchRenderData [documentItems=" + documentItems + ", facetResponse=" + facetResponse + ", appendHighlightParams="
218                 + appendHighlightParams + ", execTime=" + execTime + ", pageSize=" + pageSize + ", currentPageNumber=" + currentPageNumber
219                 + ", allRecordCount=" + allRecordCount + ", allRecordCountRelation=" + allRecordCountRelation + ", allPageCount="
220                 + allPageCount + ", existNextPage=" + existNextPage + ", existPrevPage=" + existPrevPage + ", currentStartRecordNumber="
221                 + currentStartRecordNumber + ", currentEndRecordNumber=" + currentEndRecordNumber + ", pageNumberList=" + pageNumberList
222                 + ", partialResults=" + partialResults + ", searchQuery=" + searchQuery + ", queryTime=" + queryTime + ", requestedTime="
223                 + requestedTime + ", queryId=" + queryId + "]";
224     }
225 
226 }