ObjectDB Database Search

1-50 of 200 results

Strings in JPQL and Criteria Queries

' , ''. as parameters - when string values are assigned as arguments. as  path expressions - in ... is always the string to check for a match (usually a path expression ) and the right operand is always the pattern ... ;is evaluated to TRUE . '100' LIKE '%\%' ESCAPE '\' is evaluated to FALSE . In the expressions

JPA Query Expressions (JPQL / Criteria)

Query expressions are the foundations on which JPQL and criteria queries are built. Every query ... of JPQL / Criteria query expressions . Atomic Expressions The atomic query expressions are: JPQL / Criteria Variables JPQL / Criteria Parameters JPQL / Criteria Literals Every query expression consists

Criteria Query Expressions

The following interfaces are in use in representing general expressions in criteria queries: See the Query Expressions section for more details and examples.

FROM clause (JPQL / Criteria API)

The JOIN FETCH expression is not a regular JOIN and it does not define a JOIN variable. Its only purpose ... at the WHERE clause level by using a type expression . For example, in the following query, c iterates ... variable that serves as a root and additional join variables that are bound to path expressions

jakarta.persistence.criteria.CriteriaBuilder

criteria queries, compound selections, expressions , predicates, orderings. Note that Predicate is used instead of Expression in this API in order to work around the fact that Java generics are not ... explains how to use CriteriaBuilder . Public Instance Methods Expression abs ( Expression x ) Create

Numbers in JPQL and Criteria Queries

, -12.5 . as parameters - when numeric values are assigned as arguments. as  path expressions - in navigation to persistent numeric fields. as aggregate expressions - e.g. COUNT. as collection ... value is numeric, e.g. LOCATE, LENGTH. as composite arithmetic expressions that use operators

jakarta.persistence.criteria.Expression

Jakarta Persistence (JPA) Interface jakarta.persistence.criteria. Expression Type Parameters: - the type of the expression Super Interfaces: Selection , TupleElement Type for query expressions . Since: Jakarta Persistence (JPA) 2.0 The JPA Query Expressions (JPQL / Criteria) article explains

jakarta.persistence.criteria.CriteriaBuilder.substring(Expression,Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression substring (    Expression x ,    Expression from ,    Expression len ) Create an expression for substring extraction. Extracts a substring of given length starting

jakarta.persistence.criteria.CriteriaBuilder.locate(Expression,Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression locate (    Expression x ,    Expression pattern ,    Expression from ) Create expression to locate the position of one string within another, returning position of first

jakarta.persistence.criteria.CriteriaBuilder.notLike(Expression,Expression,Expression)

(    Expression x ,    Expression pattern ,    Expression escapeChar ) Create a predicate for testing whether the expression does not satisfy the given pattern. Parameters: x - string expression pattern - string expression escapeChar - escape character expression

jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression replace (    Expression x ,    Expression substring ,    Expression replacement ) Create an expression replacing every occurrence of a substring within a string. Parameters: x

jakarta.persistence.criteria.CriteriaBuilder.like(Expression,Expression,Expression)

(    Expression x ,    Expression pattern ,    Expression escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string expression escapeChar - escape character expression Returns: like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.between(Expression,Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate between (    Expression v ,    Expression x ,    Expression y ) Create ... . Parameters: x - expression y - expression v - expression Returns: between predicate. Since: Jakarta Persistence (JPA) 1.0

Paths and Types in JPQL and Criteria API

classes) are represented in JPQL by the following types of  expressions : Variables - FROM ... are assigned as arguments. Path expressions that navigate from one object to another. Instances of user ... . But more often they are used in JPQL path expressions that navigate to values of simple types (number, boolean

ORDER BY clause (JPQL / Criteria API)

Expressions The following query returns names of countries whose population size ... . Then the SELECT clause builds the results by evaluating the result expressions . Finally the results are ordered by evaluation of the ORDER BY expressions . Only expressions that are derived directly from

SELECT clause (JPQL / Criteria API)

the ability to use almost any valid JPQL expression in SELECT clauses. Specifying the required query ... the "SELECT *" expression (which is commonly used in SQL). Projection of Path Expressions JPQL ... path expressions , such as c.name , in query results is referred to as projection. The field values

jakarta.persistence.criteria.CriteriaBuilder.nullif(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression nullif (    Expression x ,    Expression y ) Create an expression that tests whether its argument are equal, returning null if they are and the value of the first expression

Date and Time in JPQL and Criteria Queries

Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12 ...   path expressions - in navigation to persistent date and time fields. as results of predefined JPQL current date and time functions. Current Date and Time JPA defines special JPQL expressions

Literals in JPQL and Criteria Queries

expressions . Ordinary Literals The main method, literal , takes a Java object and returns a literal expression . For example: // Boolean literals: Expression t = cb. literal (true); Expression f = cb. literal (Boolean.FALSE); // Numeric literals: Expression i1 = cb. literal (1); Expression i2 = cb

jakarta.persistence.criteria.CriteriaBuilder.substring(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression substring (    Expression x ,    Expression from ) Create an expression for substring ... . First position is 1. Parameters: x - string expression from - start position expression Returns

jakarta.persistence.criteria.CriteriaBuilder.concat(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression concat (    Expression x ,    Expression y ) Create an expression for string concatenation. Parameters: x - string expression y - string expression Returns: expression corresponding to concatenation. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.trim(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression trim (    Expression t ,    Expression x ) Create expression to trim character from both ends of a string. Parameters: x - expression for string to trim t - expression for character

jakarta.persistence.criteria.CriteriaBuilder.trim(Trimspec,Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression trim (    Trimspec ts ,    Expression t ,    Expression x ) Create expression to trim character from a string. Parameters: x - expression for string to trim t - expression

jakarta.persistence.criteria.CriteriaBuilder.locate(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression locate (    Expression x ,    Expression pattern ) Create expression to locate ... . Parameters: x - expression for string to be searched pattern - expression for string to be located

jakarta.persistence.criteria.CriteriaBuilder.coalesce(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression coalesce (    Expression x ,    Expression y ) Create an expression that returns null ... otherwise. Parameters: x - expression y - expression Returns: coalesce expression . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.right(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression right (    Expression x ,    Expression len ) Create an expression for the rightmost substring of a string, Parameters: x - string expression len - length of the substring to return

jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,String,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression replace (    Expression x ,    String substring ,    Expression replacement ) Create an expression replacing every occurrence of a substring within a string. Parameters: x

jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,Expression,String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression replace (    Expression x ,    Expression substring ,    String replacement ) Create an expression replacing every occurrence of a substring within a string. Parameters: x

jakarta.persistence.criteria.CriteriaBuilder.left(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression left (    Expression x ,    Expression len ) Create an expression for the leftmost substring of a string, Parameters: x - string expression len - length of the substring to return

jakarta.persistence.criteria.CriteriaBuilder.prod(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression prod (    Expression x ,    Expression y ) Create an expression that returns the product of its arguments. Parameters: x - expression y - expression Returns: product. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.sum(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression sum (    Expression x ,    Expression y ) Create an expression that returns the sum of its arguments. Parameters: x - expression y - expression Returns: sum. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.mod(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression mod (    Expression x ,    Expression y ) Create an expression that returns the modulus (remainder under integer division) of its arguments. Parameters: x - expression y - expression Returns: modulus. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.diff(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression diff (    Expression x ,    Expression y ) Create an expression that returns the difference between its arguments. Parameters: x - expression y - expression Returns: difference. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.quot(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression quot (    Expression x ,    Expression y ) Create an expression that returns the quotient of its arguments. Parameters: x - expression y - expression Returns: quotient. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.notLike(Expression,Expression,char)

(    Expression x ,    Expression pattern ,    char escapeChar ) Create a predicate for testing whether the expression does not satisfy the given pattern. Parameters: x - string expression pattern - string expression escapeChar - escape character Returns: not-like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.notLike(Expression,String,Expression)

(    Expression x ,    String pattern ,    Expression escapeChar ) Create a predicate for testing whether the expression does not satisfy the given pattern. Parameters: x - string expression pattern - string escapeChar - escape character expression Returns: not-like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.like(Expression,String,Expression)

(    Expression x ,    String pattern ,    Expression escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string escapeChar - escape character expression Returns: like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.notLike(Expression,Expression)

(    Expression x ,    Expression pattern ) Create a predicate for testing whether the expression does not satisfy the given pattern. Parameters: x - string expression pattern - string expression Returns: not-like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.Case.when(Expression,Expression)

when (    Expression condition ,    Expression result ) Add a when/then clause to the case expression . Parameters: result - "then" result expression condition - "when" condition Returns: general case expression . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.SimpleCase.when(Expression,Expression)

SimpleCase when (    Expression condition ,    Expression result ) Add a when/then clause to the case expression . Parameters: result - "then" result expression condition - "when" condition Returns: simple case expression . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.like(Expression,Expression)

(    Expression x ,    Expression pattern ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string expression Returns: like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.like(Expression,Expression,char)

(    Expression x ,    Expression pattern ,    char escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string expression escapeChar - escape character Returns: like predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.or(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate or (    Expression x ,    Expression y ) Create a disjunction of the given boolean expressions . Parameters: x - boolean expression y - boolean expression Returns: or predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.and(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate and (    Expression x ,    Expression y ) Create a conjunction of the given boolean expressions . Parameters: x - boolean expression y - boolean expression Returns: and predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.power(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression power (    Expression x ,    Expression y ) Create an expression that returns the first argument raised to the power of its second argument. Parameters: x - base y - exponent Returns

jakarta.persistence.criteria.CriteriaBuilder.isMember(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate isMember (    Expression elem ,    Expression collection ) Create a predicate ... will be false. Parameters: elem - element expression collection - expression Returns: is-member predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.isNotMember(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate isNotMember (    Expression elem ,    Expression collection ) Create a predicate ... will be true. Parameters: elem - element expression collection - expression Returns: is-not-member predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.gt(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate gt (    Expression x ,    Expression y ) Create a predicate for testing whether the first argument is greater than the second. Parameters: x - expression y - expression Returns: greater-than predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.ge(Expression,Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate ge (    Expression x ,    Expression y ) Create a predicate for testing whether the first argument is greater than or equal to the second. Parameters: x - expression y - expression

jakarta.persistence.criteria.CriteriaBuilder.lessThanOrEqualTo(Expression,Expression)

lessThanOrEqualTo (    Expression x ,    Expression y ) Create a predicate for testing whether the first argument is less than or equal to the second. Parameters: x - expression y - expression Returns: less-than-or-equal predicate. Since: Jakarta Persistence (JPA) 1.0