Description
Writing a persistent data access layer in Java quickly becomes complex and expensive to develop. The objective of the Hibernate framework is to simplify development. This course will provide you with all the elements necessary to effectively develop a persistence layer via Hibernate.
Who is this training for ?
For whom ?
Project managers, analysts, designers, software architects and developers.
Prerequisites
Training objectives
Training program
- Java persistence techniques
- Persistence techniques.
- Persistence framework.
- The Hibernate project.
- Hibernate vs JPA.
- Develop a simple persistent class
- Install the framework.
- Code the persistent class.
- Set configuration properties.
- Run Hibernate.
- Performing an HQL query.
- Practical work Mapping a simple class.
- Executing an HQL query.
- Object/relational mapping with Hibernate
- Objectives.
- Development of persistent classes.
- Perform the mapping of the most common cases.
- Hibernate annotations vs JPA annotations.
- Choose an identifier generator.
- Implementation of a one-to-one, one-to-many and inheritance relationship.
- Handle persistent objects
- CRUD operations.
- Object life cycle.
- Synchronization with the database.
- Cascading persistence.
- Load persistent objects.
- Improve the mapping of classes and properties.
- Mapping bag, list and map associations.
- Work practices Create, update, delete, and load persistent objects.
- Use a derived attribute.
- Mapping a collection of values.
- Implementation of a many-to-many association.
- HQL language and Criteria API
- Create queries with join, query.
- Use projections with HQL.
- Queries on sets.
- Practical work Perform an optimized HQL query.
- Code a query using the Criteria API.
- Concurrent Transactions and Access
- Presentation of the properties of a transaction.
- Atomicity management.
- Data isolation management.
- Technical locking.
- Practical work Implementation of a transaction.
- Use Hibernate cache
- Objectives.
- First and second level cache.
- Practical work Configuring the Hibernate cache.
- Automatic generation of resources
- Hibernate Tools.
- Generation of the hibernate configuration file.
- cfg.
- xml.
- Generation of classes of the model (DAO/POJO) from the SQL schema (Reverse Engineering).
- Automation with ANT tasks.
- hbm2ddl (SchemaExport).
- Generation of tables from mapping files.
- Practical work Installation of the Eclipse Hibernate tools plug-in.
- Reverse Engineering of an existing database.