Removed all persistent fields from Projections, making all calculations "live". This made it possible to make all class methods static, but I'm not really sure that's a good idea. Revisit.
Made all domain model classes inherit common pattern base classes, removing lots of boilerplate code.
Made all immutable fields final, setting to null in package local no-args ctor (Hibernate will stil be able to set fields in runtime).
Added javadoc on Cargo.
Removed "empty itinerary" null pattern object, since a cargo is not always supposed to have an itinerary. More work left here though.
Huuuuge commit: restructured into project hierarchy, no other code changes. Everything compiles, tests run, but deployment is broken and will be remodeled.
Using "notifyOf..." naming convention in ApplicationEvents.
HandlingEvents now have a unique sequence number, and CargoUpdater looks events based on that to update the cargo in question.
First version of pessimistic locking of cargo during rerouting.
Cargo is now a facade for aggregate-internal classes Delivery and Projections.
Delivery calculates current voyage, last known location and transport status on the fly.
Introduced a tracking id generator domain service for getting next tracking id, instead of doing it in the cargo repository.
Extracted a Projections value object in the Cargo aggregate, which handles predictions about the future of the cargo (next expected activity, ETA).
Migrating to a much cleaner way to propagate handling updates to the cargo aggregate: Cargo.handled(HandlingActivity).
Moved some logic into *Status enums, making them richer.
Improvements to a number of toString()s
Expanded voyage rescheduling scenario test to include the case where a voyage is rescheduled so that the old itinerary is no longer maintainable, and modified the domain model to handle that case.
HandlingEvent now has a HandlingActivity field internally. HaAct is moved to shared package, as it's being used persistently by both Cargo and HandlingEvent.
Also improved a few toString() methods and added a CargoFactoryTest.
Added loadCargoForRouting application service call, which will put a pessimistic lock on a cargo during (re-)routing in order to show benefits of aggregate separation explicitly. Not implemented yet though.