Chapter 3. Domain models and metadata

 

In this chapter

  • Discovering the CaveatEmptor example application
  • Implementing the domain model
  • Object/relational mapping metadata options

The “Hello World” example in the previous chapter introduced you to Hibernate; certainly, it isn’t useful for understanding the requirements of real-world applications with complex data models. For the rest of the book, we use a much more sophisticated example application—CaveatEmptor, an online auction system—to demonstrate Hibernate and Java Persistence. (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

 
 

3.3.2. Applying Bean Validation rules

 
 
 

3.3.3. Externalizing metadata with XML files

 
 

3.3.4. Accessing metadata at runtime

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest