Introduction to Hibernate

This course introduces developers to the world of ORM (Object-Relational Mapping) using the most prevalent ORM framework in the Java world; Hibernate. Hibernate, when used correctly can simplify the development of object-oriented database-driven applications. Learn when and how to use Hibernate. We will start by learning the basic concepts but quickly move to tackle a real problem domain that will include basic and complex mapping concepts bridging the gap between rich domain object models and complex database schemas.


Session Agenda

Sessions begin at 9AM and end at 5PM. Attendees must bring their own laptop.

Day 1

  • Introduction to ORM with Hibernate
    • Object-Relational Mapping
    • Hibernate Core Concepts
    • Hibernate Architecture
    • Overview of the Persistence Lifecycle
    • Hibernate Mappings
    • Configuring Hibernate
    • Working with Persistent Objects
    • Object Identity, the importance of equals() and hashcode()
    • Simple Relationships
    • Unidirectional and Bidirectional Relationships
    • Working with Collections
    • Introduction to HQL - The Hibernate Query Language

Day 2

  • Intermediate Hibernate
    • Mapping Inheritance Hierarchies
    • Working with Hibernate Transactions
    • Using Hibernate Types and Creating Custom Types
    • Optimistic and Pessimistic Locking
    • ID generation strategies
    • Hibernate Restrictions, Windowing Results, Sorting, Grouping, Aggregates and Projections
    • Query by Criteria
    • Query by Example
    • Advanced Querying: Named Queries Grouping, Subqueries, Native SQL
    • Overview of supporting tools for Hibernate development