|
|
@@ -65,8 +65,8 @@ public class Itinerary implements ValueObject<Itinerary> {
|
|
65
|
65
|
if (handlingActivity.type() == HandlingEvent.Type.LOAD) {
|
|
66
|
66
|
//Check that the there is a leg with same load location and voyage
|
|
67
|
67
|
for (Leg leg : legs) {
|
|
68
|
|
- if (leg.loadLocation().sameIdentityAs(handlingActivity.location()) &&
|
|
69
|
|
- leg.voyage().sameIdentityAs(handlingActivity.voyage()))
|
|
|
68
|
+ if (leg.loadLocation().sameAs(handlingActivity.location()) &&
|
|
|
69
|
+ leg.voyage().sameAs(handlingActivity.voyage()))
|
|
70
|
70
|
return true;
|
|
71
|
71
|
}
|
|
72
|
72
|
return false;
|
|
|
@@ -75,8 +75,8 @@ public class Itinerary implements ValueObject<Itinerary> {
|
|
75
|
75
|
if (handlingActivity.type() == HandlingEvent.Type.UNLOAD) {
|
|
76
|
76
|
//Check that the there is a leg with same unload location and voyage
|
|
77
|
77
|
for (Leg leg : legs) {
|
|
78
|
|
- if (leg.unloadLocation().sameIdentityAs(handlingActivity.location()) &&
|
|
79
|
|
- leg.voyage().sameIdentityAs(handlingActivity.voyage()))
|
|
|
78
|
+ if (leg.unloadLocation().sameAs(handlingActivity.location()) &&
|
|
|
79
|
+ leg.voyage().sameAs(handlingActivity.voyage()))
|
|
80
|
80
|
return true;
|
|
81
|
81
|
}
|
|
82
|
82
|
return false;
|
|
|
@@ -155,7 +155,7 @@ public class Itinerary implements ValueObject<Itinerary> {
|
|
155
|
155
|
|
|
156
|
156
|
Leg lastAdded = null;
|
|
157
|
157
|
for (Leg leg : this.legs) {
|
|
158
|
|
- if (leg.voyage().sameIdentityAs(rescheduledVoyage)) {
|
|
|
158
|
+ if (leg.voyage().sameAs(rescheduledVoyage)) {
|
|
159
|
159
|
Leg modifiedLeg = leg.withRescheduledVoyage(rescheduledVoyage);
|
|
160
|
160
|
// This truncates the itinerary if the voyage rescheduling makes
|
|
161
|
161
|
// it impossible to maintain the old unload-load chain.
|
|
|
@@ -190,7 +190,7 @@ public class Itinerary implements ValueObject<Itinerary> {
|
|
190
|
190
|
*/
|
|
191
|
191
|
public Date loadTimeAt(final Location location) {
|
|
192
|
192
|
for (Leg leg : legs) {
|
|
193
|
|
- if (leg.loadLocation().sameIdentityAs(location)) {
|
|
|
193
|
+ if (leg.loadLocation().sameAs(location)) {
|
|
194
|
194
|
return leg.loadTime();
|
|
195
|
195
|
}
|
|
196
|
196
|
}
|
|
|
@@ -203,7 +203,7 @@ public class Itinerary implements ValueObject<Itinerary> {
|
|
203
|
203
|
*/
|
|
204
|
204
|
public Date unloadTimeAt(final Location location) {
|
|
205
|
205
|
for (Leg leg : legs) {
|
|
206
|
|
- if (leg.unloadLocation().sameIdentityAs(location)) {
|
|
|
206
|
+ if (leg.unloadLocation().sameAs(location)) {
|
|
207
|
207
|
return leg.unloadTime();
|
|
208
|
208
|
}
|
|
209
|
209
|
}
|