2626
2727/**
2828 * @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>
3032 */
3133public class CursorEntity {
3234
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+
3387 public static class Warning {
3488
3589 private Integer code ;
@@ -53,18 +107,10 @@ public Stats getStats() {
53107 return stats ;
54108 }
55109
56- public void setStats (final Stats stats ) {
57- this .stats = stats ;
58- }
59-
60110 public Collection <Warning > getWarnings () {
61111 return warnings ;
62112 }
63113
64- public void setWarnings (final Collection <Warning > warnings ) {
65- this .warnings = warnings ;
66- }
67-
68114 }
69115
70116 public static class Stats {
@@ -80,113 +126,29 @@ public Long getWritesExecuted() {
80126 return writesExecuted ;
81127 }
82128
83- public void setWritesExecuted (final Long writesExecuted ) {
84- this .writesExecuted = writesExecuted ;
85- }
86-
87129 public Long getWritesIgnored () {
88130 return writesIgnored ;
89131 }
90132
91- public void setWritesIgnored (final Long writesIgnored ) {
92- this .writesIgnored = writesIgnored ;
93- }
94-
95133 public Long getScannedFull () {
96134 return scannedFull ;
97135 }
98136
99- public void setScannedFull (final Long scannedFull ) {
100- this .scannedFull = scannedFull ;
101- }
102-
103137 public Long getScannedIndex () {
104138 return scannedIndex ;
105139 }
106140
107- public void setScannedIndex (final Long scannedIndex ) {
108- this .scannedIndex = scannedIndex ;
109- }
110-
111141 public Long getFiltered () {
112142 return filtered ;
113143 }
114144
115- public void setFiltered (final Long filtered ) {
116- this .filtered = filtered ;
117- }
118-
119145 public Long getFullCount () {
120146 return fullCount ;
121147 }
122148
123- public void setFullCount (final Long fullCount ) {
124- this .fullCount = fullCount ;
125- }
126-
127149 public Double getExecutionTime () {
128150 return executionTime ;
129151 }
130152
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 ;
158153 }
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-
192154}
0 commit comments