Suggestion for handling domain validation as close to each domain object as possible - Location now requires UN locode argument to constructor to match a certain regexp, and each HandlingEvent.Type may answer type.requiresCarrierMovement() and type.prohibitsCarrierMovement(), evaluated from HandlingEvent constructor.
Replaced ellipsis argument in DeliveryHistory.addEvents() with two methods; one that takes a single HandlingEvent and one that takes a Collection<HandlingEvent>
HandlingEventService now has a single, strongly typed method for registering events.
A JAX-WS-based remote interface for registering events has been introduced, which works as an anti-corruption layer as well.
CarrierMovementRepository uses Hibernate implementation, test class created.
Reverted to Spring 2.0.8 in order to get JAX-WS integration going, but that's only until the next release gets out.
Made Cargo-HandlingEvent relation bidirectional again, with DeliveryHistory in the middle.
Restored Cargo.lastKnownLocation() and Cargo.hasArrived().
All entities have sequential identifiers with no domain meaning. Equals and hashcode rely on business logic unrelated to persistence state.
Removed findDeliveryHistory from HaEvRepo since it's now OR-mapped.
Improved javadoc.
- Persistent implementations of all repositories are in place, with tests and sample data generation.
Sample data is shared between testing and web application, and is loaded through a ServletContextListener
- No relation Cargo -> HandlingEvent, it only goes the other way. A HandlingEvent is only associated to one Cargo.
- TrackingId and CarrierMovementId do not rely on toString() anymore, the accessor for the id string is now called idString().
- CarrierId is now CarrierMovementId
- HandlingEventService now has named methods for registerLoad(), registerUnload() etc instead of the String "type" argument, which was extremely fragile.
Made persistence configuration less intrusive by going with defaults everywhere, making it easier on the eyes. Empty default constructors are pushed to the bottom of the class.
Introduced CarrierId and embedded the DeliveryHistory in Cargo, aligning the persistence with the model as described in the DDD book.
Location.NULL changed name to Location.UNKNOWN.
Changed persistence layer to point to the InMem repositories
Added test-context-persistence.xml to still be able to test hibernate repositories
Added HandlingEventService (first lab version...)
Added HandlingEvent- and Carrier-Repository.
Modified some equality operators to fit better with HandlingEventRepository (Maybe unneccessary after all, but it's working...)