1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.codelibs.fess.es.user.allcommon;
17
18 import org.dbflute.cbean.result.PagingResultBean;
19 import org.elasticsearch.action.search.SearchRequestBuilder;
20 import org.elasticsearch.search.aggregations.Aggregations;
21
22
23
24
25
26 public class EsPagingResultBean<ENTITY> extends PagingResultBean<ENTITY> {
27
28 private static final long serialVersionUID = 1L;
29
30 protected long took;
31 private int totalShards;
32 private int successfulShards;
33 private int failedShards;
34 private Aggregations aggregations;
35
36 private SearchRequestBuilder builder;
37
38 public EsPagingResultBean(final SearchRequestBuilder builder) {
39 this.builder = builder;
40 }
41
42 public String getQueryDsl() {
43 return builder.toString();
44 }
45
46 public long getTook() {
47 return took;
48 }
49
50 public void setTook(long took) {
51 this.took = took;
52 }
53
54 public int getTotalShards() {
55 return totalShards;
56 }
57
58 public void setTotalShards(int totalShards) {
59 this.totalShards = totalShards;
60 }
61
62 public int getSuccessfulShards() {
63 return successfulShards;
64 }
65
66 public void setSuccessfulShards(int successfulShards) {
67 this.successfulShards = successfulShards;
68 }
69
70 public int getFailedShards() {
71 return failedShards;
72 }
73
74 public void setFailedShards(int failedShards) {
75 this.failedShards = failedShards;
76 }
77
78 public Aggregations getAggregations() {
79 return aggregations;
80 }
81
82 public void setAggregation(Aggregations aggregations) {
83 this.aggregations = aggregations;
84 }
85
86 }