se.citerus.dddsample.domain.model.voyage
Class Voyage.Builder

java.lang.Object
  extended by se.citerus.dddsample.domain.model.voyage.Voyage.Builder
Enclosing class:
Voyage

public static final class Voyage.Builder
extends java.lang.Object

Builder pattern is used for incremental construction of a Voyage aggregate. This serves as an aggregate factory.


Constructor Summary
Voyage.Builder(VoyageNumber voyageNumber, Location departureLocation)
           
 
Method Summary
 Voyage.Builder addMovement(Location arrivalLocation, java.util.Date departureTime, java.util.Date arrivalTime)
           
 Voyage build()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Voyage.Builder

public Voyage.Builder(VoyageNumber voyageNumber,
                      Location departureLocation)
Method Detail

addMovement

public Voyage.Builder addMovement(Location arrivalLocation,
                                  java.util.Date departureTime,
                                  java.util.Date arrivalTime)

build

public Voyage build()


Copyright © 2009. All Rights Reserved.