Jakarta Persistence
Jakarta Persistence, also known as JPA (abbreviated from the former name Java Persistence API) is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications. Persistence in this context covers three areas: * The API itself, defined in the jakarta.persistence package ( for Jakarta EE 8 and below) * The Jakarta Persistence Query Language (JPQL; formerly Java Persistence Query Language) * Object/relational metadata
Jakarta Persistence, also known as JPA (abbreviated from the former name Java Persistence API) is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications. Persistence in this context covers three areas: The API itself, defined in the jakarta.persistence package ( for Jakarta EE 8 and below) The Jakarta Persistence Query Language (JPQL; formerly Java Persistence Query Language) Object/relational metadata @Entity public class Person { @Id private long id; private String firstName; private String lastName; private int age; } The @Entity annotation declares that the class represents an entity. @Id declares the attribute which acts as the primary key of the entity. Additional annotations may be used to declare additional metadata (for example changing the default table name in the @Table annotation), or to create associations between entities. == Related technologies== ==Version history== ===JPA 2.0=== Development of a new version of JPA 2.0 was started in July 2007 in the Java Community Process as JSR 317. JPA 2.0 was approved as final on 10 December 2009. The focus of JPA 2.0 was to address features that were present in some of the popular ORM vendors but could not gain consensus approval for JPA 1.0. Main features included were: Expanded object-relational mapping functionality Support for collections of embedded objects, linked in the ORM with a many-to-one relationship Ordered lists Combinations of access types A criteria query API Standardization of SQL Hints Standardization of additional metadata to support DDL generation Support for validation Shared object cache support. Vendors supporting JPA 2.0: Batoo JPA DataNucleus (formerly JPOX) EclipseLink (formerly Oracle TopLink) IBM, for WebSphere Application Server JBoss with Hibernate ObjectDB OpenJPA OrientDB Versant Corporation JPA (object database) ===JPA 2.1=== Development of JPA version 2.1 began in July 2011 as JSR 338. JPA 2.1 was approved as final on 22 May 2013. Main features included were: Converters, which allow custom code conversions between database and object types Criteria update/delete to allow bulk updates and deletes through the Criteria API Entity graphs for partial or specified fetching or merging of objects. JPQL/Criteria enhancements such as arithmetic subqueries, generic database functions, join ON clause and the TREAT option. Schema generation Support for stored procedures Vendors supporting JPA 2.1: DataNucleus EclipseLink Hibernate OpenJPA (from version 2.2.0) ===JPA 2.2=== Development of JPA 2.2, a maintenance release, began in 2017 under JSR 338. The maintenance review was approved on 19 June 2017. Main features included were: The addition of @Repeatable to all relevant annotations Support for JPA annotations to be used in metaannotations Streaming for query results The ability for AttributeConverters to be CDI-injectable Support for Java 8 date and time types Vendors supporting JPA 2.2: DataNucleus (from version 5.1) EclipseLink (from version 2.7) Hibernate (from version 5.3) OpenJPA (from version 3.0) ===Jakarta Persistence 3.0=== The JPA was renamed as Jakarta Persistence in 2019 and version 3.0 was released in 2020. This included the renaming of packages and properties from javax.persistence to jakarta.persistence. Vendors supporting Jakarta Persistence 3.0: DataNucleus (from version 6.0) EclipseLink (from version 3.0) Hibernate (from version 5.5) OpenJPA (from version 4.0) ===Jakarta Persistence 3.1=== Version 3.1 was released in 2022. It is part of Jakarta EE 10, and thus requires at least Java 11 to run. It adds better UUID handling, various new JPQL functions for math and date/time handling, and other small changes. Vendors supporting Jakarta Persistence 3.1: DataNucleus (from version 6.0) EclipseLink (from version 4.0) Hibernate (from version 6.0) OpenJPA (from version 4.0) ===Jakarta Persistence 3.2=== Version 3.2 was released in 2024. It introduced a large number of API improvements along with some improvements to the query language. Vendors supporting Jakarta Persistence 3.2: EclipseLink (from version 5.0) Hibernate (from version 7.0) ==See also== .NET Persistence API (NPA) JDBC ==References== ==Further reading== ==External links== ===General info=== Documentation for the final version of the EJB3 spec (called JSR220) GlassFish's Persistence page JCP Persistence page ===Tutorials=== Java EE 6 Persistence API Javadoc Java EE 6 Persistence API tutorial Java EE 7 Persistence API Javadoc Java EE 7 Persistence API tutorial Persistence in the Java EE 5 tutorial Jakarta EE Specification Guide - Persistence Explained Jakarta EE Starter Guide - How to Store and Retrieve Data Using Jakarta Persistence Jakarta EE Official Tutorial - Introduction to Jakarta Persistence
Cite this
"Jakarta Persistence". 1761780445. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1319465592