beautypg.com

Hibernate annotations, Hibernate entitymanager, Hibernate annotations hibernate entitymanager – HP Integrity NonStop H-Series User Manual

Page 296

background image

Hibernate Annotations

In Hibernate, the application metadata is commonly provided to the Java Virtual Machine (JVM)
through XML files. You can also use Annotations to provide the application metadata.

Annotations enable you to provide the metadata for the Object and Relational Table mapping
by including the metadata information in the Plain Old Java Objects (POJO) file along with the
code. This helps you to understand the table structure and POJO simultaneously during
application development. This also reduces the complexity of the application because you need
not maintain separate files for the metadata.

To leverage the above-mentioned features of Annotations in Hibernate, the Hibernate community
provides the Hibernate Annotations package.

The Hibernate Annotations package includes:

Standardized Java Persistence and EJB 3.0 (JSR 220) object/relational mapping annotations

Hibernate-specific extension annotations for performance optimization and special mappings

NOTE:

The Annotation feature is supported in Java 5.0 and later versions.

The steps required for downloading and installing Hibernate Annotations are explained in

Appendix J: Installing Hibernate Annotations Libraries on NonStop

Hibernate EntityManager

Java EE provides EJB3 specifications to standardize the basic APIs and the metadata required
for any object/relational persistence mechanism. The Hibernate community provides the Hibernate
EntityManager project, which implements the programming interfaces and lifecycle rules as
defined by the EJB3 persistence specifications.

The Hibernate EntityManager implements the following:

Standard Java Persistence management API

Standard Java Persistence Query Language

Standard Java Persistence object lifecycle rules

Standard Java Persistence configuration and packaging

You can implement a complete EJB3 persistence solution using Hibernate Annotations and the
Hibernate EntityManager with the Hibernate package.

NOTE:

The EJB3 specification is supported on Java 5.0 and above versions.

The steps required for downloading and installing Hibernate EntityManager are explained in

Appendix K: Installing Hibernate EntityManager Libraries on NonStop

296

Hibernate Overview

This manual is related to the following products: