Description
Inspired by the Hibernate and Toplink frameworks, JPA has become the standard for managing the persistence of Java objects in a database. In this training, you will implement the concept of object-relational mapping guaranteeing better portability of your Java EE applications.
Who is this training for ?
For whom ?Developers, software architects and project managers.
Prerequisites
Training objectives
Training program
- Java and JPA persistence techniques
- The different persistence mechanisms: Java API and frameworks.
- The Java Persistence API (JPA) solution.
- Integration of JPA into a Java EE application.
- Developing a persistent class
- Code the persistent class.
- Perform the Object/relational mapping.
- Configure and start the JPA engine.
- Perform a query JPQL.
- Saving a persistent object.
- Practical work Mapping a class.
- Executing a JPQL query.
- Object/Relational Mapping with JPA
- Context and objectives of an ORM.
- Principle of developing persistent classes.
- Using annotations to configure an Object/Relational mapping.
- Mapping classes and associations.
- Mapping strategy for inheritance.
- Practical work Choose an identifier generator.
- Implementation of a one-to-one, one-to-many and inheritance relationship.
- Handle persistent objects
- The different reading techniques.
- Loading strategies.
- Principle of lazy loading.
- CRUD operations (Create/ Read/Update/Delete).
- Life cycle of persistent objects.
- Synchronization with the database.
- Practical work Create , update and delete persistent objects.
- Advanced use of mapping
- Compound primary key, multitable mapping.
- Control INSERT and UPDATE queries.
- List, map and many-to-many associations.
- Practical work Mapping a secondary table.
- Implementation of a many-to-many association.
- The JPQL language
- Query queries.
- Operations on strings and temporal data.
- Inner, outer and reported joins.
- Principle of subqueries.
- Queries on sets.
- Practical work Perform an optimized JPQL query.
- Concurrent Transactions and Access
- Recall the properties of a transaction.
- Transactional management with JPA.
- Integration in a Web and EJB application.
- Lock pessimistic and optimistic.
- Practical work Implementation of transactional management.