Toutes nos formations sont désormais disponibles en "Live Virtual classes". Contactez-nous pour plus d’informations : formation@oxiane.luToutes nos formations sont désormais disponibles en "Live Virtual classes". Contactez-nous pour plus d’informations : formation@oxiane.lu

Manage Data using Java/JEE & JPA

Accueil » Formations » Java » Manage Data using Java/JEE & JPA

The interest of implementing an object-relational mapping layer between an "object" business model and a relational database is probably no longer to be demonstrated: the code that contains the SQL queries is isolated in a single place, allowing reduced adherence to the database schema; the business model can respect the principles of object programming, use inheritance and navigation.
Resulting from the work of the JSR 220 (EJB 3) expert group, JPA is a key specification of Java EE. Far from being just another framework, JPA establishes a simplified standard for persistence to ensure better portability of Java EE applications.
JPA naturally takes the best practices of established frameworks such as Hibernate or TopLink. EJB 3 relies on JPA for entity persistence.
This training allows to understand and experiment JPA by practice. It is an essential prerequisite for the EJB3 course.

1700 € HT 3 jours JE-JPA

Implementing persistence with Java Persistence API (JPA)

Programme

Persistence issue

  • Object-relational mapping
  • Interest of JPA, positioning
  • JPA and application servers
  • History of solutions, Hibernate, TopLink, EJB
  • Java EE: history
  • Java EE servers

Persistence model

  • Defining a persistent entity, concept of POJO, attributes, relationships
  • Entity and Identity
  • Life cycle of entities
  • Setting up a mapping
  • Mapping without annotations
  • Mapping with annotations
  • Declaring attributes
  • Representing different types of relationships between entities
    • Embedded class
    • 0..1 relation
    • 1..N and N..1 relation
    • N..M ralation
  • CRUD entities handling
  • bidirectionality (or inverse relationship)
  • Inheritance and polymorphism management
  • Mapping an entity on several tables

Lab

  • Implementation of the persistence of a model illustrating the different presented configurations

Entity manipulation

  • Entity Manager concept
  • Transaction management, JTA (java Transaction API)
  • Queries: named queries and dynamic queries, Java Persistence Query Language
  • Defining query
  • Executing query
  • Parameterized queries
  • JPQL syntax

Lab

  • Using JPA querying features

Performance

  • Cascade usage
  • Loading optimization and Lazy Loading
  • Optimistic locking

Conclusion

  • Overview of implementations
  • Future of Java application servers and persistence
This site is registered on wpml.org as a development site.