2525
2626import java .util .Collection ;
2727import java .util .Map ;
28+ import java .util .Objects ;
2829
2930/**
3031 * @author Mark Vollmary
@@ -59,6 +60,18 @@ public Boolean getCacheable() {
5960 return cacheable ;
6061 }
6162
63+ @ Override
64+ public boolean equals (Object o ) {
65+ if (!(o instanceof AqlExecutionExplainEntity )) return false ;
66+ AqlExecutionExplainEntity that = (AqlExecutionExplainEntity ) o ;
67+ return Objects .equals (plan , that .plan ) && Objects .equals (plans , that .plans ) && Objects .equals (warnings , that .warnings ) && Objects .equals (stats , that .stats ) && Objects .equals (cacheable , that .cacheable );
68+ }
69+
70+ @ Override
71+ public int hashCode () {
72+ return Objects .hash (plan , plans , warnings , stats , cacheable );
73+ }
74+
6275 public static final class ExecutionPlan {
6376 private Collection <ExecutionNode > nodes ;
6477 private Collection <String > rules ;
@@ -90,6 +103,18 @@ public Integer getEstimatedCost() {
90103
9E88
td> public Integer getEstimatedNrItems () {
91104 return estimatedNrItems ;
92105 }
106+
107+ @ Override
108+ public boolean equals (Object o ) {
109+ if (!(o instanceof ExecutionPlan )) return false ;
110+ ExecutionPlan that = (ExecutionPlan ) o ;
111+ return Objects .equals (nodes , that .nodes ) && Objects .equals (rules , that .rules ) && Objects .equals (collections , that .collections ) && Objects .equals (variables , that .variables ) && Objects .equals (estimatedCost , that .estimatedCost ) && Objects .equals (estimatedNrItems , that .estimatedNrItems );
112+ }
113+
114+ @ Override
115+ public int hashCode () {
116+ return Objects .hash (nodes , rules , collections , variables , estimatedCost , estimatedNrItems );
117+ }
93118 }
94119
95120 public static final class ExecutionNode {
@@ -208,6 +233,18 @@ public ExecutionCollection getCondition() {
208233 public Boolean getReverse () {
209234 return reverse ;
210235 }
236+
237+ @ Override
238+ public boolean equals (Object o ) {
239+ if (!(o instanceof ExecutionNode )) return false ;
240+ ExecutionNode that = (ExecutionNode ) o ;
241+ return Objects .equals (type , that .type ) && Objects .equals (dependencies , that .dependencies ) && Objects .equals (id , that .id ) && Objects .equals (estimatedCost , that .estimatedCost ) && Objects .equals (estimatedNrItems , that .estimatedNrItems ) && Objects .equals (depth , that .depth ) && Objects .equals (database , that .database ) && Objects .equals (collection , that .collection ) && Objects .equals (inVariable , that .inVariable ) && Objects .equals (outVariable , that .outVariable ) && Objects .equals (conditionVariable , that .conditionVariable ) && Objects .equals (random , that .random ) && Objects .equals (offset , that .offset ) && Objects .equals (limit , that .limit ) && Objects .equals (fullCount , that .fullCount ) && Objects .equals (subquery , that .subquery ) && Objects .equals (isConst , that .isConst ) && Objects .equals (canThrow , that .canThrow ) && Objects .equals (expressionType , that .expressionType ) && Objects .equals (indexes , that .indexes ) && Objects .equals (expression , that .expression ) && Objects .equals (condition , that .condition ) && Objects .equals (reverse , that .reverse );
242+ }
243+
244+ @ Override
245+ public int hashCode () {
246+ return Objects .hash (type , dependencies , id , estimatedCost , estimatedNrItems , depth , database , collection , inVariable , outVariable , conditionVariable , random , offset , limit , fullCount , subquery , isConst , canThrow , expressionType , indexes , expression , condition , reverse );
247+ }
211248 }
212249
213250 public static final class ExecutionVariable {
@@ -221,6 +258,18 @@ public Long getId() {
221258 public String getName () {
222259 return name ;
223260 }
261+
262+ @ Override
263+ public boolean equals (Object o ) {
264+ if (!(o instanceof ExecutionVariable )) return false ;
265+ ExecutionVariable that = (ExecutionVariable ) o ;
266+ return Objects .equals (id , that .id ) && Objects .equals (name , that .name );
267+ }
268+
269+ @ Override
270+ public int hashCode () {
271+ return Objects .hash (id , name );
272+ }
224273 }
225274
226275 public static final class ExecutionExpression {
@@ -264,6 +313,18 @@ public Collection<Long> getLevels() {
264313 public Collection <ExecutionExpression > getSubNodes () {
265314 return subNodes ;
266315 }
316+
317+ @ Override
318+ public boolean equals (Object o ) {
319+ if (!(o instanceof ExecutionExpression )) return false ;
320+ ExecutionExpression that = (ExecutionExpression ) o ;
321+ return Objects .equals (type , that .type ) && Objects .equals (name , that .name ) && Objects .equals (id , that .id ) && Objects .equals (value , that .value ) && Objects .equals (sorted , that .sorted ) && Objects .equals (quantifier , that .quantifier ) && Objects .equals (levels , that .levels ) && Objects .equals (subNodes , that .subNodes );
322+ }
323+
324+ @ Override
325+ public int hashCode () {
<
6D38
/tr>326+ return Objects .hash (type , name , id , value , sorted , quantifier , levels , subNodes );
327+ }
267328 }
268329
269330 public static final class ExecutionCollection {
@@ -277,6 +338,18 @@ public String getName() {
277338 public String getType () {
278339 return type ;
279340 }
341+
342+ @ Override
343+ public boolean equals (Object o ) {
344+ if (!(o instanceof ExecutionCollection )) return false ;
345+ ExecutionCollection that = (ExecutionCollection ) o ;
346+ return Objects .equals (name , that .name ) && Objects .equals (type , that .type );
347+ }
348+
349+ @ Override
350+ public int hashCode () {
351+ return Objects .hash (name , type );
352+ }
280353 }
281354
282355 public static final class ExecutionStats {
@@ -305,6 +378,18 @@ public Long getPeakMemoryUsage() {
305378 public Double getExecutionTime () {
306379 return executionTime ;
307380 }
381+
382+ @ Override
383+ public boolean equals (Object o ) {
384+ if (!(o instanceof ExecutionStats )) return false ;
385+ ExecutionStats that = (ExecutionStats ) o ;
386+ return Objects .equals (rulesExecuted , that .rulesExecuted ) && Objects .equals (rulesSkipped , that .rulesSkipped ) && Objects .equals (plansCreated , that .plansCreated ) && Objects .equals (peakMemoryUsage , that .peakMemoryUsage ) && Objects .equals (executionTime , that .executionTime );
387+ }
388+
389+ @ Override
390+ public int hashCode () {
391+ return Objects .hash (rulesExecuted , rulesSkipped , plansCreated , peakMemoryUsage , executionTime );
392+ }
308393 }
309394
310395}
0 commit comments