Hibernate Training
This 3-day course starts with an introduction to Object-Relation Mapping (ORM) that covers when and why to use these technologies. Hibernate is introduced in the context of a realistic domain model to be mapped to a relational database. All development in the course is approach in a test-driven manner making using of JUnit 4 (TestNG optional on request).
The course progresses by taking a hands on approach to learn the how to solve the different scenarios that are typically presented to enterprise developers using ORM technologies; effective querying and controlling and manipulating mapped object graphs. Days 2 and 3 cover intermediate and advanced topics that should take you to next level of productivity when using Hibernate.
Session Agenda
Sessions begin at 9AM and end at 5PM. Attendees must bring their own laptop.
Day 1
- Object-Relational Mapping
- Hibernate Core Concepts
- Hibernate Architecture
- Dissecting Hibernate's Inner Workings
- Overview of the Persistence Lifecycle
- Hibernate Mappings
- Configuring Hibernate
- Working with Persistent Objects and the Hibernate Session
- Testing Hibernate with JUnit
- Object Identity, the importance of equals() and hashcode()
- Primary Key Generation Strategies
- Simple Relationships
- Value Object Mappings
- Unidirectional and Bidirectional Relationships
- Understanding Inverse Relationships
- Working with Collections
- Optimistic Locking and Versioning
- Dealing with Concurrency in an ORM system
- Introduction to HQL: The Hibernate Query Language
- Working with the different type of HQL queries
- Externalizing your queries
- Creating Projection and Aggregate queries
Day 2
- Mapping Inheritance Hierarchies
- The power of polymorphic queries
- Understanding Hibernate Transactions and the Session Life-Cycle
- Managed versus NonāManaged Environments
- Simplifying your Hibernate code with getCurrentSession()
- Controlling Flushing and the Session Size
- Session Strategies
- Advanced HQL
- Bulk Updates and Deletes
- Eager and Lazy fetching in queries
- Native SQL queries and Custom SQL
- Query Filters
- The Hibernate Criteria API
- Programmatically building queries
- Query By Example
- Enhancing the Criteria API programmatically
Day 3
- Understanding Hibernate Caching Architecture
- The relationship between the first level cache and the second level cache
- Working with EHCache and JBossCache
- Caching, efficiency and avoiding diminishing returns
- Dealing with Legacy Schemas
- Store procedures and functions
- Business Keys and Compound Primary Keys
- Designing an effective ORM tier
- Schema Design for ORM
- The DAO pattern
- Comparing DTOs and Detachable Persistent Objects
- Implementing Open Session in View - Servlet Filters, Spring Support
- Avoiding Anemic Domain Models
- Advanced ORM testing
- Simplifying Integration testing with DBUnit
- Overview of Complementary Hibernate Projects
- Hibernate Tools
- Hibernate Validator
- Hibernate Search