Oracle Logo

JPA 2.2 Example

 

JPA 2.2 New Features Introduction

JPA 2.2 adds injection support in @AttributeConverter. That means attribute converter classes in Java EE environments support dependency injection through the Contexts and Dependency Injection API (CDI) when CDI is enabled. The support for CDI Injection will allow to inject your reusable conversion implementation into an AttributeConverter.

JPA 2.2 adds the support for mapping of the java.time.LocalDate, java.time. LocalTime, java.time.LocalDateTime, java.time.OffsetTime, and java.time.OffsetDateTime types. So you will no longer need the converter with JPA 2.2.

JPA 2.2 enhances the methods to retrieve the results of Query and TypedQuery as streams.

Description of the Example

This example demonstrates the all new features described above. You can add a new employee by using following Create button, or you can retrieve all employees.

Use This Example

Add a New Employee

Name:
Job Title:
Manager Name:
tags: