|
The Java Persistence Query Language (JPQL) is a platform-independent object-oriented query language defined as part of the Java Persistence API (JPA) 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, but operate against JPA entity objects rather than directly with database tables. In addition to retrieving objects ( SELECT queries), JPQL supports set based UPDATE and DELETE queries.==Examples== Example JPA Classes, getters and setters omitted for simplicity. Then a simple query to retrieve the list of all authors, ordered alphabetically, would be: To retrieve the list of authors that have ever been published by XYZ Press: JPQL supports named parameters, which begin with the colon ( : ). We could write a function returning a list of authors with the given last name as follows:抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Java Persistence Query Language」の詳細全文を読む スポンサード リンク
|