20
20
import lombok .Setter ;
21
21
22
22
import java .util .HashSet ;
23
+ import java .util .Map ;
23
24
import java .util .Set ;
24
25
25
26
import org .springframework .data .annotation .ReadOnlyProperty ;
27
+ import org .springframework .data .neo4j .core .schema .CompositeProperty ;
26
28
import org .springframework .data .neo4j .core .schema .GeneratedValue ;
27
29
import org .springframework .data .neo4j .core .schema .Id ;
28
30
import org .springframework .data .neo4j .core .schema .Node ;
@@ -57,6 +59,9 @@ public class SkuRO {
57
59
@ Relationship (type = "RANGE_RELATION_TO" , direction = Relationship .Direction .INCOMING )
58
60
private Set <RangeRelationRO > rangeRelationsIn = new HashSet <>();
59
61
62
+ @ CompositeProperty
63
+ private Map <String , Integer > composite ;
64
+
60
65
public SkuRO (Long number , String name ) {
61
66
this .number = number ;
62
67
this .name = name ;
@@ -67,4 +72,89 @@ public RangeRelationRO rangeRelationTo(SkuRO sku, double minDelta, double maxDel
67
72
rangeRelationsOut .add (relationOut );
68
73
return relationOut ;
69
74
}
75
+
76
+ public Long getId () {
77
+ return this .id ;
78
+ }
79
+
80
+ public Long getNumber () {
81
+ return this .number ;
82
+ }
83
+
84
+ public String getName () {
85
+ return this .name ;
86
+ }
87
+
88
+ public Set <RangeRelationRO > getRangeRelationsOut () {
89
+ return this .rangeRelationsOut ;
90
+ }
91
+
92
+ public Set <RangeRelationRO > getRangeRelationsIn () {
93
+ return this .rangeRelationsIn ;
94
+ }
95
+
96
+ public void setId (Long id ) {
97
+ this .id = id ;
98
+ }
99
+
100
+ public void setNumber (Long number ) {
101
+ this .number = number ;
102
+ }
103
+
104
+ public void setName (String name ) {
105
+ this .name = name ;
106
+ }
107
+
108
+ public void setRangeRelationsOut (Set <RangeRelationRO > rangeRelationsOut ) {
109
+ this .rangeRelationsOut = rangeRelationsOut ;
110
+ }
111
+
112
+ public void setRangeRelationsIn (Set <RangeRelationRO > rangeRelationsIn ) {
113
+ this .rangeRelationsIn = rangeRelationsIn ;
114
+ }
115
+
116
+ public boolean equals (final Object o ) {
117
+ if (o == this ) {
118
+ return true ;
119
+ }
120
+ if (!(o instanceof SkuRO )) {
121
+ return false ;
122
+ }
123
+ final SkuRO other = (SkuRO ) o ;
124
+ if (!other .canEqual ((Object ) this )) {
125
+ return false ;
126
+ }
127
+ final Object this$id = this .getId ();
128
+ final Object other$id = other .getId ();
129
+ if (this$id == null ? other$id != null : !this$id .equals (other$id )) {
130
+ return false ;
131
+ }
132
+ final Object this$number = this .getNumber ();
133
+ final Object other$number = other .getNumber ();
134
+ if (this$number == null ? other$number != null : !this$number .equals (other$number )) {
135
+ return false ;
136
+ }
137
+ final Object this$name = this .getName ();
138
+ final Object other$name = other .getName ();
139
+ if (this$name == null ? other$name != null : !this$name .equals (other$name )) {
140
+ return false ;
141
+ }
142
+ return true ;
143
+ }
144
+
145
+ protected boolean canEqual (final Object other ) {
146
+ return other instanceof SkuRO ;
147
+ }
148
+
149
+ public int hashCode () {
150
+ final int PRIME = 59 ;
151
+ int result = 1 ;
152
+ final Object $id = this .getId ();
153
+ result = result * PRIME + ($id == null ? 43 : $id .hashCode ());
154
+ final Object $number = this .getNumber ();
155
+ result = result * PRIME + ($number == null ? 43 : $number .hashCode ());
156
+ final Object $name = this .getName ();
157
+ result = result * PRIME + ($name == null ? 43 : $name .hashCode ());
158
+ return result ;
159
+ }
70
160
}
0 commit comments