Jakarta Persistence Query Language: Difference between revisions

Content deleted Content added
m Disambiguating links to Object-orientation (link changed to Object-oriented programming) using DisamAssist.
 
(11 intermediate revisions by 5 users not shown)
Line 1:
{{norefinline|date=June 2010}}
{{Infobox programming language
| name = JavaJakarta Persistence Query Language
| logo =
| paradigm =
Line 11:
| latest_test_version =
| latest_test_date =
| turing-complete = No
| typing =
| implementations =
| dialects =
| influenced_by = [[SQL]], [[Hibernate_Hibernate (Java)#Hibernate_Query_LanguageHibernate Query Language (HQL)|Hibernate]]
| influenced =
| operating_system = [[Cross-platform]]
Line 21 ⟶ 20:
| website =
}}
The '''JavaJakarta Persistence Query Language''' ('''JPQL'''; formerly Java Persistence Query Language) is a platform-independent [[Object-oriented programming|object-oriented]] [[query language]]{{sfn|Bauer|King|Gregory|2016}}{{rp|loc=§12|p=284}} defined as part of the [[JavaJakarta Persistence API]] (JPA; formerly Java Persistence API) specification.
 
JPQL is used to make queries against entities stored in a relational database. It is heavily inspired by [[SQL]], and its queries resemble SQL queries in syntax,{{sfn|Bauer|King|Gregory|2016}}{{rp|loc=§1.3|p=17}} but operate against JPA entity objects rather than directly with database tables.{{sfn|Bauer|King|Gregory|2016}}{{rp|loc=§2.2.3|p=26}}
 
In addition to retrieving objects (<code>SELECT</code> queries), JPQL supports set based <code>UPDATE</code> and <code>DELETE</code> queries.
Line 101 ⟶ 100:
==Hibernate Query Language==
 
JPQL is based on the [[Hibernate_Hibernate (Java)#Hibernate_Query_Language_Hibernate Query Language (HQL)|Hibernate Query Language]] (HQL), an earlier non-standard query language included in the [[Hibernate (Java)|Hibernate]] [[object-relational mapping]] library.
 
Hibernate and the HQL were created before the JPA specification.
As of Hibernate 3 JPQL is a subset of HQL.
 
==Citations==
{{Reflist}}
 
==References==
*{{citation
|last1 = Bauer
|first1 = Christian
|last2 = King
|first2 = Gavin
|last3 = Gregory
|first3 = Gary
| year = 2016
| title = Java Persistence with Hibernate
| edition = Second
| publisher = [[Manning Publications]]
| isbn = 978-1617290459
| url =
}}
 
==See also==
* [[Object-relational mapping]]
* [[Hibernate (framework)]]
* [[JavaJakarta Persistence API]]
* [[ActiveJPA]]
 
== External links ==
* {{official website}}
** [https://docseclipse-ee4j.oraclegithub.com/javaee/6io/jakartaee-tutorial/doc/bnbuf.html#full-query-language-syntax Full Query Language Syntax from The JavaJakarta EE 68 Tutorial]
* [https://www.objectdb.com/java/jpa/query JPA Queries and JPQL - a chapter of the ObjectDB Manual]
* [https://torpedoquery.org/ Type safe Hibernate (HQL) query engine - TorpedoQuery]