|
|
@@ -77,8 +77,8 @@ public final class HandlingEvent implements DomainEvent<HandlingEvent> {
|
|
77
|
77
|
}
|
|
78
|
78
|
|
|
79
|
79
|
@Override
|
|
80
|
|
- public boolean sameValueAs(Type other) {
|
|
81
|
|
- return other != null && this.equals(other);
|
|
|
80
|
+ public boolean sameValueAs(final Type other) {
|
|
|
81
|
+ return this.equals(other);
|
|
82
|
82
|
}
|
|
83
|
83
|
|
|
84
|
84
|
}
|
|
|
@@ -92,14 +92,13 @@ public final class HandlingEvent implements DomainEvent<HandlingEvent> {
|
|
92
|
92
|
* @param voyage the voyage
|
|
93
|
93
|
* @param operatorCode operator code for port operator
|
|
94
|
94
|
*/
|
|
95
|
|
- // TODO make package local
|
|
96
|
|
- public HandlingEvent(final Cargo cargo,
|
|
97
|
|
- final Date completionTime,
|
|
98
|
|
- final Date registrationTime,
|
|
99
|
|
- final Type type,
|
|
100
|
|
- final Location location,
|
|
101
|
|
- final Voyage voyage,
|
|
102
|
|
- final OperatorCode operatorCode) {
|
|
|
95
|
+ HandlingEvent(final Cargo cargo,
|
|
|
96
|
+ final Date completionTime,
|
|
|
97
|
+ final Date registrationTime,
|
|
|
98
|
+ final Type type,
|
|
|
99
|
+ final Location location,
|
|
|
100
|
+ final Voyage voyage,
|
|
|
101
|
+ final OperatorCode operatorCode) {
|
|
103
|
102
|
Validate.notNull(cargo, "Cargo is required");
|
|
104
|
103
|
Validate.notNull(completionTime, "Completion time is required");
|
|
105
|
104
|
Validate.notNull(registrationTime, "Registration time is required");
|
|
|
@@ -166,6 +165,10 @@ public final class HandlingEvent implements DomainEvent<HandlingEvent> {
|
|
166
|
165
|
return activity.voyage() != null ? activity.voyage() : Voyage.NONE;
|
|
167
|
166
|
}
|
|
168
|
167
|
|
|
|
168
|
+ public OperatorCode operatorCode() {
|
|
|
169
|
+ return operatorCode;
|
|
|
170
|
+ }
|
|
|
171
|
+
|
|
169
|
172
|
public Date completionTime() {
|
|
170
|
173
|
return new Date(this.completionTime.getTime());
|
|
171
|
174
|
}
|