Architecture training

Duration 3 days Get a quote


  • Concepts and issues of data persistence
  • From JDBC to MNOs
  • Standardization of ORM: birth of Java Persistence API specification
  • Hibernate: its origins, its ecosystem

Set up

  • Product installation and configuration files configuration
  • Pool of connections
  • SQL traces

Premier mapping

  • Map a simple Java object on a table
  • Configuration by convention, annotation and XML
  • ID Generator


  • EntityManager: role, initializations
  • Transient, attached, detached: the life cycle of an entity
  • The transactions
  • Create, Read, Update, Delete with JPA: the basic operations of the EntityManager
  • The flush


  • One to Many / Many to One relationship
  • Many to Many relationship
  • One to One relationship
  • Bidirectional relationship
  • Cascading

The inheritance

  • Strategy one table
  • Strategy one table per concrete class
  • Strategy one table per class
  • Advantages and disadvantages of each strategy
  • Technical inheritance with MappedSuperClass

The components

  • Concept of entity and value
  • Map a class with Embedded
  • Component Collection


  • A query mode of the object world based on SQL
  • Exploring JPQL operators
  • Injecting parameters into queries
  • Dynamic querying with the Criteria API
  • Generation of the meta model

The lazy-loading

  • Lazy-loading a relationship to Many
  • Lazy-loading a relationship to one
  • Using proxies: the pitfalls to avoid
  • The problem of 1 + N Select and its solutions


  • The second level cache
  • Statistics

Advanced Mapping

  • Optimistic and pessimistic locking
  • Multiple keys

Spring and application architecture

  • Layer cut and CAD design pattern
  • The scope of the EntityManager and the transaction
  • Integrate Hibernate / JPA into a Spring application
  • Generation of CAD with Spring Data JPA


  • How to test a DAO JPA?
  • Using Spring Test
  • Introduction to DBUnit