瀏覽代碼

Renamed ON/OFF events LOAD/UNLOAD

peter_backlund 19 年之前
父節點
當前提交
985120153b

+ 1
- 1
dddsample/src/main/java/se/citerus/dddsample/domain/Cargo.java 查看文件

@@ -38,7 +38,7 @@ public class Cargo {
38 38
     }
39 39
     CarrierMovement cm = lastEvent.getCarrierMovement();
40 40
 
41
-    return (lastEvent.type() == HandlingEvent.Type.ON) ? cm.from() : cm.to();
41
+    return (lastEvent.type() == HandlingEvent.Type.LOAD) ? cm.from() : cm.to();
42 42
   }
43 43
 
44 44
   public TrackingId trackingId() {

+ 3
- 3
dddsample/src/main/java/se/citerus/dddsample/domain/HandlingEvent.java 查看文件

@@ -1,10 +1,10 @@
1 1
 package se.citerus.dddsample.domain;
2 2
 
3
-import java.util.Date;
4
-
5 3
 import org.apache.commons.lang.builder.EqualsBuilder;
6 4
 import org.apache.commons.lang.builder.HashCodeBuilder;
7 5
 
6
+import java.util.Date;
7
+
8 8
 /**
9 9
  * HandlingEvent links the type of handling with a CarrierMovement.
10 10
  * 
@@ -20,7 +20,7 @@ public class HandlingEvent implements Comparable<HandlingEvent> {
20 20
   private final Date time;
21 21
 
22 22
   public enum Type {
23
-    ON, OFF;
23
+    LOAD, UNLOAD
24 24
   }
25 25
 
26 26
   public HandlingEvent(Date time, Type type, CarrierMovement carrierMovement) {