Publication date : 02/05/2024

Course : Hibernate, object/relational mapping

Practical course - 3d - 21h00 - Ref. HIB
Price : 1650 € E.T.

Hibernate, object/relational mapping




Writing a persistent data access layer in Java quickly proves complex and costly to develop. The aim of Hibernate is to simplify development. This course will provide you with the elements you need to efficiently develop a persistence layer using Hibernate.


INTER
IN-HOUSE
CUSTOM

Practical course in person or remote class
Disponible en anglais, à la demande

Ref. HIB
  3d - 21h00
1650 € E.T.




Writing a persistent data access layer in Java quickly proves complex and costly to develop. The aim of Hibernate is to simplify development. This course will provide you with the elements you need to efficiently develop a persistence layer using Hibernate.


Teaching objectives
At the end of the training, the participant will be able to:
Object/relational mapping with Hibernate
Create, update, delete and load persistent objects
Perform queries using HQL and the Criteria API
Managing transactions and concurrent access
Configuring the Hibernate cache

Intended audience
Project managers, analysts, designers, software architects and developers.

Prerequisites
Knowledge of Java and the JDBC API.

Practical details
Hands-on work
Practical work is carried out with Hibernate, Eclipse and MySQL.

Course schedule

1
Java persistence techniques

  • Persistence techniques. Persistence framework. The Hibernate project. Hibernate versus JPA.

2
Developing a simple persistent class

  • Install the framework. Code persistent class.
  • Define configuration properties.
  • Run Hibernate. Perform an HQL query.
Hands-on work
Mapping a simple class. Execute an HQL query.

3
Object/relational mapping with Hibernate

  • Objectives. Developing persistent classes.
  • Mapping the most common cases. Hibernate annotations versus JPA annotations.
  • Choosing an identifier generator. Implementing one-to-one, one-to-many and inheritance relationships.

4
Handling persistent objects

  • CRUD operations. Object life cycle.
  • Synchronization with database. Cascading persistence.
  • Load persistent objects.
  • Improve class and property mapping.
  • Mapping bag, list and map associations.
Hands-on work
Create, update, delete and load persistent objects. Use a derived attribute. Mapping a collection of values. Implementing a many-to-many association.

5
HQL language and Criteria API

  • Create join and query queries.
  • Using projections with HQL. Queries on sets.
Hands-on work
Perform an optimized HQL query. Code a query using the Criteria API.

6
Competing transactions and access

  • Overview of transaction properties. Atomicity management. Data isolation management.
  • Locking technology.
Hands-on work
Implementing a transaction.

7
Using the Hibernate cache

  • Objectives. First and second level cache.
Hands-on work
Configuring the Hibernate cache.

8
Automatic resource generation

  • Hibernate Tools. Generate configuration file hibernate.cfg.xml.
  • Generation of model classes (DAO/POJO) from SQL schema (Reverse Engineering).
  • Automation with ANT tasks.
  • hbm2ddl (SchemaExport). Table generation from mapping files.
Hands-on work
Installation of the Eclipse Hibernate tools plug-in. Reverse engineering an existing database.


Dates and locations
Select your location or opt for the remote class then choose your date.
Remote class

Dernières places
Date garantie en présentiel ou à distance
Session garantie

REMOTE CLASS
2026 : 9 Mar., 17 June, 28 Sep., 16 Dec.

PARIS LA DÉFENSE
2026 : 9 Mar., 17 June, 28 Sep., 16 Dec.