se.citerus.dddsample.domain.model.cargo
Interface CargoRepository

All Known Implementing Classes:
CargoRepositoryHibernate

public interface CargoRepository


Method Summary
 Cargo find(TrackingId trackingId)
          Finds a cargo using given id.
 java.util.List<Cargo> findAll()
          Finds all cargo.
 TrackingId nextTrackingId()
           
 void store(Cargo cargo)
          Saves given cargo.
 

Method Detail

find

Cargo find(TrackingId trackingId)
Finds a cargo using given id.

Parameters:
trackingId - Id
Returns:
Cargo if found, else null

findAll

java.util.List<Cargo> findAll()
Finds all cargo.

Returns:
All cargo.

store

void store(Cargo cargo)
Saves given cargo.

Parameters:
cargo - cargo to save

nextTrackingId

TrackingId nextTrackingId()
Returns:
A unique, generated tracking Id.


Copyright © 2009. All Rights Reserved.