File tree 1 file changed +20
-0
lines changed
src/main/java/org/springframework/data/elasticsearch/core/join
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package org .springframework .data .elasticsearch .core .join ;
17
17
18
+ import java .util .Objects ;
19
+
18
20
import org .springframework .data .annotation .PersistenceConstructor ;
19
21
import org .springframework .lang .Nullable ;
20
22
21
23
/**
22
24
* @author Subhobrata Dey
25
+ * @author Sascha Woo
23
26
* @since 4.1
24
27
*/
25
28
public class JoinField <ID > {
@@ -54,4 +57,21 @@ public ID getParent() {
54
57
public String getName () {
55
58
return name ;
56
59
}
60
+
61
+ @ Override
62
+ public int hashCode () {
63
+ return Objects .hash (name , parent );
64
+ }
65
+
66
+ @ Override
67
+ public boolean equals (Object obj ) {
68
+ if (this == obj ) {
69
+ return true ;
70
+ }
71
+ if (!(obj instanceof JoinField )) {
72
+ return false ;
73
+ }
74
+ JoinField other = (JoinField ) obj ;
75
+ return Objects .equals (name , other .name ) && Objects .equals (parent , other .parent );
76
+ }
57
77
}
You can’t perform that action at this time.
0 commit comments