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

Hibernate

Accueil » Formations » Java » Hibernate

The interest of implementing an object-relational mapping layer to decouple an "object" business model from a relational database probably no longer needs to be demonstrated: the code that contains the SQL queries is isolated in a single place, allowing to reduce the adherence to the database schema; the business model can respect the principles of object programming, using inheritance and navigation.

Hibernate is at the origin of many of the concepts used by the JSR 220 (EJB 3) expert group to establish the JPA specification. Today, it is one of the open source reference implementations of this specification.

A rich and reliable tool, Hibernate offers a wide range of configuration options to establish a powerful mapping adapted to the specific needs of an application.

1700 € HT 3 jours JP-HIB1

Implementing Java persistence with Hibernate

Programme

Objectives

  • Defining of object persistence
  • Classes, mapping file, configuration, object life cycle
  • Mapping of unidirectional/bidirectional associations and collections

Hibernate architecture

  • Layer view
  • Instance life cycle
  • JNDI, JDBC, JTA integration
  • Session management

Configuration

  • APIs for programmatic configuration
  • Opening sessions
  • JDBC connection management
  • SQL dialects, second level cache and query cache
  • XML configuration file
  • Integration with a Java EE application server

Defining persistent classes

  • Plain Old Java Object (POJO)
  • Using inheritance
  • Redefining equals and hashCode methods

Basics of Object Relational Mapping

  • Mapping declarations
  • Types used by Hibernate
  • Several mappings for the same class
  • Java 5 annotations

Defining the persistence of collections

  • Persistent collections types
  • Foreign keys, elements and indexes of a collection
  • Associations *..* and 1..*

Establishing the persistence of associations

  • Unidirectional associations
  • Bidirectional associations
  • Complex mappings

Establishing the persistence of inheritance relationships

  • Different strategies
  • Using a discriminant
  • Management of polymorphism
  • Comparing strategies, advantages and disadvantages, when to use them

Hibernate Query Language (HQL) and management of persistent objects

  • Storing and loading an object
  • HQL language syntax, from, select, where, order by, group by clauses
  • Joins, aggregation, polymorphic queries
  • Nested queries
  • Good practices
  • Externalization of named queries
  • Lazy loading of properties
  • Managing the second level cache
  • Query cache
This site is registered on wpml.org as a development site.