About literal

1-10 of 53Refresh
Manual
489

Literals in JPQL and Criteria Queries [2011-09-20]

Literals in JPQL, as in Java, represent constant values. JPQL supports various types of literals including NULL, boolean literals (TRUE and FALSE), numeric literals (e.g. 100), string literals (e.g. 'abc'), enum literals (e.g. mypackage.MyEnum.MY_VALUE) and entity type literals (e.g. Country). JPQL
Manual
489

Literals in JPQL and Criteria Queries

Literals in JPQL, as in Java, represent constant values. JPQL supports various types of literals including NULL, boolean literals (TRUE and FALSE), numeric literals (e.g. 100), string literals (e.g. 'abc'), enum literals (e.g. mypackage.MyEnum.MY_VALUE) and entity type literals (e.g. Country). JPQL
JPA Doc
120

literal(value)

Method javax.persistence.criteria.CriteriaBuilder Expression literal(   T value ) Create an expression for a literal. Parameters: value - value represented by the expression Returns: expression literal Throws: IllegalArgumentException - if value is null Since: JPA 2.0
Manual
40

Strings in JPQL and Criteria Queries [2019-08-03]

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 ... "); Expression l3 = cb.locate(path, param, cb.literal(2)); Expression l4 = cb.locate
Manual
40

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 ... "); Expression l3 = cb.locate(path, param, cb.literal(2)); Expression l4 = cb.locate
Manual
40

Strings in JPQL and Criteria Queries [2011-09-20]

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 ... "); Expression l3 = cb.locate(path, param, cb.literal(2)); Expression l4 = cb.locate
Manual
31

Query Parameters in JPA [2018-10-20]

for more details. Parameters vs. Literals Following is a third version of the same method. This time ... for the queried name the new method embeds the name as a String literal. There are a few drawbacks to using literals rather than parameters in queries. First, the query is not reusable. Different literal
Manual
31

Query Parameters in JPA [2011-04-01]

for more details. Parameters vs. Literals Following is a third version of the same method. This time ... for the queried name the new method embeds the name as a String literal. There are a few drawbacks to using literals rather than parameters in queries. First, the query is not reusable. Different literal
Manual
28

Query Parameters in JPA

Queries section for more details. Parameters vs. Literals Following is a third version of the same ... of using a parameter for the queried name the new method embeds the name as a String literal. There are a few drawbacks to using literals rather than parameters in queries. First and each query string
Manual
24

Paths and Types in JPQL and Criteria API [2014-05-31]

. The Country literal represents the Country entity class. The TYPE operator returns the actual type ... is not Country. Predicate p = cb.notEqual(e.type(), cb.literal(Country.class)); In ... a root or a join) and the entity type Country (a criteria literal).