3 Domain models and metadata

This chapter covers

  • Introducing the CaveatEmptor example application
  • Implementing the domain model
  • Examining object/relational mapping metadata options

The “Hello World” example in the previous chapter introduced you to Hibernate, Spring Data, and JPA, but it isn’t useful for understanding the requirements of real-world applications with complex data models. For the rest of the book, we’ll use a much more sophisticated example application—CaveatEmptor, an online auction system—to demonstrate JPA, Hibernate, and later Spring Data. (Caveat emptor means “Let the buyer beware.”)

3.1 The example CaveatEmptor application

3.1.1 A layered architecture

3.1.2 Analyzing the business domain

3.1.3 The CaveatEmptor domain model

3.2 Implementing the domain model

3.2.1 Addressing leakage of concerns

3.2.2 Transparent and automated persistence

3.2.3 Writing persistence-capable classes

3.2.4 Implementing POJO associations

3.3 Domain model metadata

3.3.1 Annotation-based metadata

Summary

sitemap