About named queries

11-20 of 200Refresh
Manual
77

UPDATE SET Queries in JPA/JPQL [2011-11-22]

. Applying changes to the database by calling the commit method. JPQL UPDATE queries provide an alternative way for updating entity objects. Unlike SELECT queries, which are used to retrieve data from the database, UPDATE queries do not retrieve data from the database, but when executed, update
Manual
76

JPA Query Structure (JPQL / Criteria)

The syntax of the Java Persistence Query Language (JPQL) is very similar to the syntax of SQL. Having a SQL like syntax in JPA queries is an important advantage because SQL is a very powerful query ... classes and objects. For example, a JPQL query can retrieve and return entity objects
Manual
72

Literals in JPQL and Criteria Queries

specifying another name explicitly in the @Entity's name annotation element. Criteria Query Literals ... literals should be used sparingly as queries that use parameters instead of literals ... values. Literals should only be embedded in JPQL queries when a single constant value is always used
Manual
70

Chapter 4 - JPA Queries (JPQL / Criteria) [2011-04-01]

(named) queries. It explains how to use the relevant interfaces, annotations, enums and methods ... The JPA Query Language (JPQL) can be considered as an object oriented version of SQL. Users ... well as how to use the JPA Criteria API, which provides an alternative way for building queries in JPA
Manual
70

Chapter 4 - JPA Queries (JPQL / Criteria) [2018-09-15]

(named) queries. It explains how to use the relevant interfaces, annotations, enums and methods ... The JPA Query Language (JPQL) can be considered as an object oriented version of SQL. Users ... well as how to use the JPA Criteria API, which provides an alternative way for building queries in JPA
Manual
70

Strings in JPQL and Criteria Queries

String values may appear in JPQL queries in various forms: as string literals - e.g. 'abc', ''. as ... literal). For example: c.name LIKE '_r%' is TRUE for 'Brazil' and FALSE for 'Denmark' c.name LIKE '%' is always TRUE (for any c.name value). c.name NOT LIKE '%' is always FALSE (for any c.name value
JPA Doc
67

JPA Annotations for JPQL Queries

The following annotations are used to define static named JPA queries: The JPA Named Queries section of the ObjectDB Manual explains and demonstrates how to use these annotations to define named JPQL queries.
Manual
50

SELECT clause (JPQL / Criteria API)

, the following query returns country names as String instances, rather than Country objects: SELECT c.name FROM Country AS c Using path expressions, such as c.name, in query results is referred to as ... > query = em.createQuery( "SELECT c.name FROM Country AS c", String.class); List
Manual
44

FROM clause (JPQL / Criteria API)

, and the same query can also be written as follows: SELECT c FROM Country c By default, the name of an entity class in a JPQL query is the unqualified name of the class (e.g. just Country with no package ... name annotation element. Multiple range variables are allowed. For example, the following query
JPA Doc
44

getParameter(name, type)

Method javax.persistence.Query Parameter getParameter(   String name,   Class type ) Get the parameter object corresponding to the declared parameter of the given name and type. This method is required to be supported for criteria queries only. Parameters: name - parameter name type - type