|
|
@@ -1,11 +1,11 @@
|
|
1
|
1
|
package se.citerus.dddsample.domain;
|
|
2
|
2
|
|
|
3
|
3
|
public class Cargo {
|
|
4
|
|
- private final String trackingId;
|
|
|
4
|
+ private final TrackingId trackingId;
|
|
5
|
5
|
private final Location from;
|
|
6
|
6
|
private final Location to;
|
|
7
|
7
|
|
|
8
|
|
- public Cargo(String trackingId, Location origin, Location finalDestination) {
|
|
|
8
|
+ public Cargo(TrackingId trackingId, Location origin, Location finalDestination) {
|
|
9
|
9
|
this.trackingId = trackingId;
|
|
10
|
10
|
this.from = origin;
|
|
11
|
11
|
this.to = finalDestination;
|
|
|
@@ -26,4 +26,8 @@ public class Cargo {
|
|
26
|
26
|
public Location currentLocation() {
|
|
27
|
27
|
return null; //To change body of created methods use File | Settings | File Templates.
|
|
28
|
28
|
}
|
|
|
29
|
+
|
|
|
30
|
+ public TrackingId trackingId() {
|
|
|
31
|
+ return null; //To change body of created methods use File | Settings | File Templates.
|
|
|
32
|
+ }
|
|
29
|
33
|
}
|