View Javadoc

1   package se.citerus.dddsample.interfaces.booking.facade.dto;
2   
3   import java.io.Serializable;
4   import java.util.Date;
5   
6   /**
7    * DTO for a leg in an itinerary.
8    */
9   public final class LegDTO implements Serializable {
10  
11    private final String voyageNumber;
12    private final String from;
13    private final String to;
14    private final Date loadTime;
15    private final Date unloadTime;
16  
17    /**
18     * Constructor.
19     *
20     * @param voyageNumber
21     * @param from
22     * @param to
23     * @param loadTime
24     * @param unloadTime
25     */
26    public LegDTO(final String voyageNumber, final String from, final String to, Date loadTime, Date unloadTime) {
27      this.voyageNumber = voyageNumber;
28      this.from = from;
29      this.to = to;
30      this.loadTime = loadTime;
31      this.unloadTime = unloadTime;
32    }
33  
34    public String getVoyageNumber() {
35      return voyageNumber;
36    }
37  
38    public String getFrom() {
39      return from;
40    }
41  
42    public String getTo() {
43      return to;
44    }
45  
46    public Date getLoadTime() {
47      return loadTime;
48    }
49  
50    public Date getUnloadTime() {
51      return unloadTime;
52    }
53    
54  }