37. ドメイン層
Offer.java
public class Offer {
OfferIdentifier id = new OfferIdentifier();
OfferTitle title = new OfferTitle();
Description description = new Description();
Features features = new Features();
EmploymentType employmentType = new EmploymentType();
Location location = new Location();
Holiday holiday = new Holiday();
AnnualSalaryRange annualSalaryRange = new AnnualSalaryRange();
CompanySummary company = new CompanySummary();
...
}
Offer アグリゲートのルート
37
初期化
38. ドメイン層
OfferRepository.java
public interface OfferRepository {
Offer findBy(OfferIdentifier id);
OfferSummaries listOfOfferSummary(Criteria criteria);
}
public class OfferSummaries {
int totalCount;
List<OfferSummary> values;
…
}
public class OfferSummary {
OfferIdentifier identifier = new OfferIdentifier();
OfferTitle title = new OfferTitle();
Description description = new Description();
Location location = new Location();
}
求人一覧用の要約オブジェクト
OfferSummaries.java
求人一覧(ファーストクラスコレクション)
OfferSummary.java
38