26
26
27
27
/**
28
28
* @author Mark - mark at arangodb.com
29
- *
29
+ *
30
+ * @see <a href="https://docs.arangodb.com/current/HTTP/AqlQueryCursor/AccessingCursors.html#create-cursor">API
31
+ * Documentation</a>
30
32
*/
31
33
public class CursorEntity {
32
34
35
+ private String id ;
36
+ private Integer count ;
37
+ private Extras extra ;
38
+ private Boolean cached ;
39
+ private Boolean hasMore ;
40
+ private VPackSlice result ;
41
+
42
+ public String getId () {
43
+ return id ;
44
+ }
45
+
46
+ /**
47
+ * @return the total number of result documents available (only available if the query was executed with the count
48
+ * attribute set)
49
+ */
50
+ public Integer getCount () {
51
+ return count ;
52
+ }
53
+
54
+ /**
55
+ * @return an optional object with extra information about the query result contained in its stats sub-attribute.
56
+ * For data-modification queries, the extra.stats sub-attribute will contain the number of modified
57
+ * documents and the number of documents that could not be modified due to an error (if ignoreErrors query
58
+ * option is specified)
59
+ */
60
+ public Extras getExtra () {
61
+ return extra ;
62
+ }
63
+
64
+ /**
65
+ * @return a boolean flag indicating whether the query result was served from the query cache or not. If the query
66
+ * result is served from the query cache, the extra return attribute will not contain any stats
67
+ * sub-attribute and no profile sub-attribute.
68
+ */
69
+ public Boolean getCached () {
70
+ return cached ;
71
+ }
72
+
73
+ /**
74
+ * @return A boolean indicator whether there are more results available for the cursor on the server
75
+ */
76
+ public Boolean getHasMore () {
77
+ return hasMore ;
78
+ }
79
+
80
+ /**
81
+ * @return an vpack-array of result documents (might be empty if query has no results)
82
+ */
83
+ public VPackSlice getResult () {
84
+ return result ;
85
+ }
86
+
33
87
public static class Warning {
34
88
35
89
private Integer code ;
@@ -53,18 +107,10 @@ public Stats getStats() {
53
107
return stats ;
54
108
}
55
109
56
- public void setStats (final Stats stats ) {
57
- this .stats = stats ;
58
- }
59
-
60
110
public Collection <Warning > getWarnings () {
61
111
return warnings ;
62
112
}
63
113
64
- public void setWarnings (final Collection <Warning > warnings ) {
65
- this .warnings = warnings ;
66
- }
67
-
68
114
}
69
115
70
116
public static class Stats {
@@ -80,113 +126,29 @@ public Long getWritesExecuted() {
80
126
return writesExecuted ;
81
127
}
82
128
83
- public void setWritesExecuted (final Long writesExecuted ) {
84
- this .writesExecuted = writesExecuted ;
85
- }
86
-
87
129
public Long getWritesIgnored () {
88
130
return writesIgnored ;
89
131
}
90
132
91
- public void setWritesIgnored (final Long writesIgnored ) {
92
- this .writesIgnored = writesIgnored ;
93
- }
94
-
95
133
public Long getScannedFull () {
96
134
return scannedFull ;
97
135
}
98
136
99
- public void setScannedFull (final Long scannedFull ) {
100
- this .scannedFull = scannedFull ;
101
- }
102
-
103
137
public Long getScannedIndex () {
104
138
return scannedIndex ;
105
139
}
106
140
107
- public void setScannedIndex (final Long scannedIndex ) {
108
- this .scannedIndex = scannedIndex ;
109
- }
110
-
111
141
public Long getFiltered () {
112
142
return filtered ;
113
143
}
114
144
115
- public void setFiltered (final Long filtered ) {
116
- this .filtered = filtered ;
117
- }
118
-
119
145
public Long getFullCount () {
120
146
return fullCount ;
121
147
}
122
148
123
- public void setFullCount (final Long fullCount ) {
124
- this .fullCount = fullCount ;
125
- }
126
-
127
149
public Double getExecutionTime () {
128
150
return executionTime ;
129
151
}
130
152
131
- public void setExecutionTime (final Double executionTime ) {
132
- this .executionTime = executionTime ;
133
- }
134
-
135
- }
136
-
137
- private String id ;
138
- private Integer count ;
139
- private Extras extra ;
140
- private Boolean cached ;
141
- private Boolean hasMore ;
142
- private VPackSlice result ;
143
-
144
- public String getId () {
145
- return id ;
146
- }
147
-
148
- public void setId (final String id ) {
149
- this .id = id ;
150
- }
151
-
152
- public Integer getCount () {
153
- return count ;
154
- }
155
-
156
- public void setCount (final Integer count ) {
157
- this .count = count ;
158
153
}
159
-
160
- public Extras getExtra () {
161
- return extra ;
162
- }
163
-
164
- public void setExtra (final Extras extra ) {
165
- this .extra = extra ;
166
- }
167
-
168
- public Boolean getCached () {
169
- return cached ;
170
- }
171
-
172
- public void setCached (final Boolean cached ) {
173
- this .cached = cached ;
174
- }
175
-
176
- public Boolean getHasMore () {
177
- return hasMore ;
178
- }
179
-
180
- public void setHasMore (final Boolean hasMore ) {
181
- this .hasMore = hasMore ;
182
- }
183
-
184
- public VPackSlice getResult () {
185
- return result ;
186
- }
187
-
188
- public void setResult (final VPackSlice result ) {
189
- this .result = result ;
190
- }
191
-
192
154
}
0 commit comments