Top Description Methods
org.hibernate.query.criteria

public Interface HibernateCriteriaBuilder

extends CriteriaBuilder
Known Direct Subinterfaces
org.hibernate.query.sqm.NodeBuilder
Known Direct Implementers
org.hibernate.query.criteria.spi.HibernateCriteriaBuilderDelegate
Annotations
@Incubating
Imports
java.math.BigDecimal, .BigInteger, java.sql.Date, .Time, .Timestamp, java.time.Duration, .Instant, java.time.temporal.Temporal, .TemporalAccessor, java.util.Collection, .List, .Map, .Set, org.hibernate.Incubating, org.hibernate.query.NullPrecedence, .SortDirection, org.hibernate.query.sqm.FrameKind, .TemporalUnit, jakarta.persistence.Tuple, jakarta.persistence.criteria.AbstractQuery, .CollectionJoin, .CriteriaBuilder, .CriteriaQuery, .Expression, .Join, .ListJoin, .MapJoin, .Path, .Predicate, .Root, .Selection, .SetJoin, .Subquery

A JPA CriteriaBuilder is a source of objects which may be composed to express a criteria query. The JPA-standard API defines all the operations needed express any query written in standard JPQL. This interface extends CriteriaBuilder, adding operations needed to express features of HQL which are not available in standard JPQL. For example:

Furthermore, the operations of this interface return types defined in the package org.hibernate.query.criteria, which extend the equivalent types in jakarta.persistence.criteria with additional operations. For example JpaCriteriaQuery adds the methods:

Finally, the method createQuery(String, Class) allows a query written in HQL to be translated to a tree of criteria objects for further manipulation and execution.

An instance of this interface may be obtained by calling org.hibernate.SessionFactory#getCriteriaBuilder().

Author
Steve Ebersole
Since
6.0
See Also
org.hibernate.SessionFactory#getCriteriaBuilder(), JpaCriteriaQuery, JpaCriteriaUpdate, JpaCriteriaDelete, JpaCriteriaInsertValues, JpaCriteriaInsertSelect, JpaCteCriteria, JpaSubQuery, JpaExpression

Method Summary

Modifier and TypeMethod and Description
public <N extends Number> JpaExpression<N>
abs(Expression<N>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.abs.

Create an expression that returns the absolute value of its argument.
public JpaExpression<Double>

Returns:

inverse cosine
acos
(Expression<? extends Number>
expression
x
)

Create an expression that returns the inverse cosine of its argument.

public <T extends Temporal> JpaExpression<T>
addDuration(Expression<T> datetime, Expression<Duration> duration)

Add a duration to a date or datetime, that is, return a later date or datetime which is separated from the given date or datetime by the given duration.

public <T extends Temporal> JpaExpression<T>
addDuration(Expression<T> datetime, Duration duration)

Add a duration to a date or datetime, that is, return a later date or datetime which is separated from the given date or datetime by the given duration.

public <T extends Temporal> JpaExpression<T>
addDuration(T datetime, Expression<Duration> duration)

Add a duration to a date or datetime, that is, return a later date or datetime which is separated from the given date or datetime by the given duration.

public <Y> JpaExpression<Y>
all(Subquery<Y>
subquery
subquery
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.all.

Create an all expression over the subquery results.
public JpaPredicate
and(Expression<Boolean>
boolean expression
x
,
Expression<Boolean>
boolean expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.and.

Create a conjunction of the given boolean expressions.
public JpaPredicate
and(Predicate...
zero or more restriction predicates
restrictions
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.and.

Create a conjunction of the given restriction predicates.
public <Y> JpaExpression<Y>
any(Subquery<Y>
subquery
subquery
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.any.

Create an any expression over the subquery results.
public JpaCompoundSelection<Object[]>
array(Selection<?>...
selection items
selections
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.array.

Create an array-valued selection item.
public JpaCompoundSelection<Object[]>
array(List<? extends JpaSelection<?>> selections)

public <Y> JpaCompoundSelection<Y>
array(Class<Y> resultClass, Selection<?>... selections)

public <Y> JpaCompoundSelection<Y>
array(Class<Y> resultClass, List<? extends JpaSelection<?>> selections)

public <T> JpaExpression<T[]>
arrayAgg(JpaOrder order, Expression<? extends T> argument)

public <T> JpaExpression<T[]>
arrayAgg(JpaOrder order, JpaPredicate filter, Expression<? extends T> argument)

public <T> JpaExpression<T[]>
arrayAgg(JpaOrder order, JpaWindow window, Expression<? extends T> argument)

public <T> JpaExpression<T[]>

Returns:

ordered set-aggregate expression
arrayAgg
(JpaOrder
order by clause used in within group
order
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<? extends T>
values to aggregate
argument
)

Create a array_agg ordered set-aggregate function expression.

public <T> JpaExpression<T[]>
arrayAppend(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Appends element to array.

public <T> JpaExpression<T[]>
arrayAppend(Expression<T[]> arrayExpression, T element)

Appends element to array.

public <T> JpaExpression<T[]>
arrayConcat(Expression<T[]> arrayExpression1, Expression<T[]> arrayExpression2)

Concatenates arrays with each other in order.

public <T> JpaExpression<T[]>
arrayConcat(Expression<T[]> arrayExpression1, T[] array2)

Concatenates arrays with each other in order.

public <T> JpaExpression<T[]>
arrayConcat(T[] array1, Expression<T[]> arrayExpression2)

Concatenates arrays with each other in order.

public <T> JpaPredicate
arrayContains(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Whether an array contains an element.

public <T> JpaPredicate
arrayContains(Expression<T[]> arrayExpression, T element)

Whether an array contains an element.

public <T> JpaPredicate
arrayContains(T[] array, Expression<T> elementExpression)

Whether an array contains an element.

public <T> JpaPredicate
arrayContainsAll(Expression<T[]> arrayExpression, Expression<T[]> subArrayExpression)

Whether an array contains another array.

public <T> JpaPredicate
arrayContainsAll(Expression<T[]> arrayExpression, T[] subArray)

Whether an array contains another array.

public <T> JpaPredicate
arrayContainsAll(T[] array, Expression<T[]> subArrayExpression)

Whether an array contains another array.

public <T> JpaPredicate
arrayContainsAllNullable(Expression<T[]> arrayExpression, Expression<T[]> subArrayExpression)

Whether an array contains another array with nullable elements.

public <T> JpaPredicate
arrayContainsAllNullable(Expression<T[]> arrayExpression, T[] subArray)

Whether an array contains another array with nullable elements.

public <T> JpaPredicate
arrayContainsAllNullable(T[] array, Expression<T[]> subArrayExpression)

Whether an array contains another array with nullable elements.

public <T> JpaPredicate
arrayContainsNullable(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Whether an array contains a nullable element.

public <T> JpaPredicate
arrayContainsNullable(Expression<T[]> arrayExpression, T element)

Whether an array contains a nullable element.

public <T> JpaPredicate
arrayContainsNullable(T[] array, Expression<T> elementExpression)

Whether an array contains a nullable element.

public <T> JpaExpression<T[]>
arrayFill(Expression<T> elementExpression, Expression<Integer> elementCountExpression)

Creates array with the same element N times, as specified by the arguments.

public <T> JpaExpression<T[]>
arrayFill(Expression<T> elementExpression, Integer elementCount)

Creates array with the same element N times, as specified by the arguments.

public <T> JpaExpression<T[]>
arrayFill(T element, Expression<Integer> elementCountExpression)

Creates array with the same element N times, as specified by the arguments.

public <T> JpaExpression<T[]>
arrayFill(T element, Integer elementCount)

Creates array with the same element N times, as specified by the arguments.

public <T> JpaExpression<T>
arrayGet(Expression<T[]> arrayExpression, Expression<Integer> indexExpression)

Accesses the element of an array by 1-based index.

public <T> JpaExpression<T>
arrayGet(Expression<T[]> arrayExpression, Integer index)

Accesses the element of an array by 1-based index.

public <T> JpaExpression<Integer>
arrayLength(Expression<T[]> arrayExpression)

Determines the length of an array.

public <T> JpaExpression<T[]>
arrayLiteral(T... elements)

Creates an array literal with the array constructor function.

public <T> JpaPredicate
arrayOverlaps(Expression<T[]> arrayExpression1, Expression<T[]> arrayExpression2)

Whether one array has any elements common with another array.

public <T> JpaPredicate
arrayOverlaps(Expression<T[]> arrayExpression1, T[] array2)

Whether one array has any elements common with another array.

public <T> JpaPredicate
arrayOverlaps(T[] array1, Expression<T[]> arrayExpression2)

Whether one array has any elements common with another array.

public <T> JpaPredicate
arrayOverlapsNullable(Expression<T[]> arrayExpression1, Expression<T[]> arrayExpression2)

Whether one array has any elements common with another array, supporting null elements.

public <T> JpaPredicate
arrayOverlapsNullable(Expression<T[]> arrayExpression1, T[] array2)

Whether one array has any elements common with another array, supporting null elements.

public <T> JpaPredicate
arrayOverlapsNullable(T[] array1, Expression<T[]> arrayExpression2)

Whether one array has any elements common with another array, supporting null elements.

public <T> JpaExpression<Integer>
arrayPosition(Expression<T[]> arrayExpression, T element)

Determines the 1-based position of an element in an array.

public <T> JpaExpression<Integer>
arrayPosition(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Determines the 1-based position of an element in an array.

public <T> JpaExpression<int[]>
arrayPositions(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Determines all 1-based positions of an element in an array.

public <T> JpaExpression<int[]>
arrayPositions(Expression<T[]> arrayExpression, T element)

Determines all 1-based positions of an element in an array.

public <T> JpaExpression<List<Integer>>
arrayPositionsList(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Determines all 1-based positions of an element in an array.

public <T> JpaExpression<List<Integer>>
arrayPositionsList(Expression<T[]> arrayExpression, T element)

Determines all 1-based positions of an element in an array.

public <T> JpaExpression<T[]>
arrayPrepend(Expression<T> elementExpression, Expression<T[]> arrayExpression)

Prepends element to array.

public <T> JpaExpression<T[]>
arrayPrepend(T element, Expression<T[]> arrayExpression)

Prepends element to array.

public <T> JpaExpression<T[]>
arrayRemove(Expression<T[]> arrayExpression, Expression<T> elementExpression)

Creates array copy with given element removed.

public <T> JpaExpression<T[]>
arrayRemove(Expression<T[]> arrayExpression, T element)

Creates array copy with given element removed.

public <T> JpaExpression<T[]>
arrayRemoveIndex(Expression<T[]> arrayExpression, Expression<Integer> indexExpression)

Creates array copy with the element at the given 1-based index removed.

public <T> JpaExpression<T[]>
arrayRemoveIndex(Expression<T[]> arrayExpression, Integer index)

Creates array copy with the element at the given 1-based index removed.

public <T> JpaExpression<T[]>
arrayReplace(Expression<T[]> arrayExpression, Expression<T> oldElementExpression, Expression<T> newElementExpression)

Creates array copy replacing a given element with another.

public <T> JpaExpression<T[]>
arrayReplace(Expression<T[]> arrayExpression, Expression<T> oldElementExpression, T newElement)

Creates array copy replacing a given element with another.

public <T> JpaExpression<T[]>
arrayReplace(Expression<T[]> arrayExpression, T oldElement, Expression<T> newElementExpression)

Creates array copy replacing a given element with another.

public <T> JpaExpression<T[]>
arrayReplace(Expression<T[]> arrayExpression, T oldElement, T newElement)

Creates array copy replacing a given element with another.

public <T> JpaExpression<T[]>
arraySet(Expression<T[]> arrayExpression, Expression<Integer> indexExpression, Expression<T> elementExpression)

Creates array copy with given element at given 1-based index.

public <T> JpaExpression<T[]>
arraySet(Expression<T[]> arrayExpression, Expression<Integer> indexExpression, T element)

Creates array copy with given element at given 1-based index.

public <T> JpaExpression<T[]>
arraySet(Expression<T[]> arrayExpression, Integer index, Expression<T> elementExpression)

Creates array copy with given element at given 1-based index.

public <T> JpaExpression<T[]>
arraySet(Expression<T[]> arrayExpression, Integer index, T element)

Creates array copy with given element at given 1-based index.

public <T> JpaExpression<T[]>
arraySlice(Expression<T[]> arrayExpression, Expression<Integer> lowerIndexExpression, Expression<Integer> upperIndexExpression)

Creates a sub-array of the based on 1-based lower and upper index.

public <T> JpaExpression<T[]>
arraySlice(Expression<T[]> arrayExpression, Expression<Integer> lowerIndexExpression, Integer upperIndex)

Creates a sub-array of the based on 1-based lower and upper index.

public <T> JpaExpression<T[]>
arraySlice(Expression<T[]> arrayExpression, Integer lowerIndex, Expression<Integer> upperIndexExpression)

Creates a sub-array of the based on 1-based lower and upper index.

public <T> JpaExpression<T[]>
arraySlice(Expression<T[]> arrayExpression, Integer lowerIndex, Integer upperIndex)

Creates a sub-array of the based on 1-based lower and upper index.

public <T> JpaExpression<String>
arrayToString(Expression<? extends Object[]> arrayExpression, Expression<String> separatorExpression)

Concatenates the non-null array elements with a separator, as specified by the arguments.

public <T> JpaExpression<String>
arrayToString(Expression<? extends Object[]> arrayExpression, String separator)

Concatenates the non-null array elements with a separator, as specified by the arguments.

public <T> JpaExpression<T[]>
arrayTrim(Expression<T[]> arrayExpression, Expression<Integer> elementCountExpression)

Creates array copy without the last N elements, specified by the second argument.

public <T> JpaExpression<T[]>
arrayTrim(Expression<T[]> arrayExpression, Integer elementCount)

Creates array copy without the last N elements, specified by the second argument.

public JpaOrder
asc(Expression<?>
expression used to define the ordering
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.asc.

Create an ordering by the ascending value of the expression.
public JpaOrder

Returns:

ascending ordering corresponding to the expression
asc
(Expression<?>
expression used to define the ordering
x
,
boolean
Whether null should be sorted first
nullsFirst
)

Create an ordering by the ascending value of the expression.

public JpaSearchOrder

Returns:

ascending ordering corresponding to the CTE attribute
asc
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
x
)

Create a search ordering by the ascending value of the CTE attribute.

public JpaSearchOrder

Returns:

ascending ordering corresponding to the CTE attribute
asc
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
x
,
boolean
Whether null should be sorted first
nullsFirst
)

Create a search ordering by the ascending value of the CTE attribute.

public JpaExpression<Double>

Returns:

inverse sine
asin
(Expression<? extends Number>
expression
x
)

Create an expression that returns the inverse sine of its argument.

public JpaExpression<Double>

Returns:

inverse tangent
atan
(Expression<? extends Number>
expression
x
)

Create an expression that returns the inverse tangent of its argument.

public JpaExpression<Double>
atan2(Number y, Expression<? extends Number> x)

public JpaExpression<Double>
atan2(Expression<? extends Number> y, Number x)

public JpaExpression<Double>

Returns:

2-argument inverse tangent
atan2
(Expression<? extends Number>
y coordinate
y
,
Expression<? extends Number>
x coordinate
x
)

Create an expression that returns the inverse tangent of y over x.

public <N extends Number> JpaExpression<Double>
avg(Expression<N>
expression representing input value to avg operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.avg.

Create an aggregate expression applying the avg operation.
public <N extends Number> JpaExpression<Double>
avg(Expression<N> argument, JpaPredicate filter)

public <N extends Number> JpaExpression<Double>
avg(Expression<N> argument, JpaWindow window)

public <
type of the input expression
N extends Number
>
JpaExpression<Double>

Returns:

aggregate function expression
avg
(Expression<N>
argument to the function
argument
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
)

Create an avg aggregate function expression.

public <Y extends Comparable<? super Y>> JpaPredicate
between(Expression<? extends Y>
expression
value
,
Expression<? extends Y>
expression
lower
,
Expression<? extends Y>
expression
upper
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.between, jakarta.persistence.criteria.CriteriaBuilder.between.

Create a predicate for testing whether the first argument is between the second and third arguments in value.
public <Y extends Comparable<? super Y>> JpaPredicate
between(Expression<? extends Y>
expression
value
,
Y
value
lower
,
Y
value
upper
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.between.

Create a predicate for testing whether the first argument is between the second and third arguments in value.
public <X, T> JpaExpression<X>
cast(JpaExpression<T> expression, Class<X> castTargetJavaType)

public <N extends Number> JpaExpression<N>

Returns:

ceiling
ceiling
(Expression<N>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.ceiling.

Create an expression that returns the ceiling of its argument, that is, the smallest integer greater than or equal to its argument.
public <T> JpaCoalesce<T>
coalesce()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.coalesce.

Create a coalesce expression.
public <Y> JpaCoalesce<Y>
coalesce(Expression<? extends Y>
expression
x
,
Expression<? extends Y>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.coalesce, jakarta.persistence.criteria.CriteriaBuilder.coalesce.

Create an expression that returns null if all its arguments evaluate to null, and the value of the first non-null argument otherwise.
public <Y> JpaCoalesce<Y>
coalesce(Expression<? extends Y>
expression
x
,
Y
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.coalesce.

Create an expression that returns null if all its arguments evaluate to null, and the value of the first non-null argument otherwise.
public JpaFunction<String>
public <E, C extends Collection<? super E>> JpaExpression<C>
collectionAppend(Expression<C> collectionExpression, Expression<? extends E> elementExpression)

Appends element to basic collection.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionAppend(Expression<C> collectionExpression, E element)

Appends element to basic collection.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionConcat(Expression<C> collectionExpression1, Expression<? extends Collection<? extends E>> collectionExpression2)

Concatenates basic collections with each other in order.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionConcat(Expression<C> collectionExpression1, Collection<? extends E> collection2)

Concatenates basic collections with each other in order.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionConcat(C collection1, Expression<? extends Collection<? extends E>> collectionExpression2)

Concatenates basic collections with each other in order.

public <E> JpaPredicate
collectionContains(Expression<? extends Collection<E>> collectionExpression, Expression<? extends E> elementExpression)

Whether a basic collection contains an element.

public <E> JpaPredicate
collectionContains(Expression<? extends Collection<E>> collectionExpression, E element)

Whether a basic collection contains an element.

public <E> JpaPredicate
collectionContains(Collection<E> collection, Expression<E> elementExpression)

Whether a basic collection contains an element.

public <E> JpaPredicate
collectionContainsAll(Expression<? extends Collection<E>> collectionExpression, Expression<? extends Collection<? extends E>> subCollectionExpression)

Whether a basic collection contains another basic collection.

public <E> JpaPredicate
collectionContainsAll(Expression<? extends Collection<E>> collectionExpression, Collection<? extends E> subCollection)

Whether a basic collection contains another basic collection.

public <E> JpaPredicate
collectionContainsAll(Collection<E> collection, Expression<? extends Collection<? extends E>> subArrayExpression)

Whether a basic collection contains another basic collection.

public <E> JpaPredicate
collectionContainsAllNullable(Expression<? extends Collection<E>> collectionExpression, Expression<? extends Collection<? extends E>> subCollectionExpression)

Whether a basic collection contains another basic collection with nullable elements.

public <E> JpaPredicate
collectionContainsAllNullable(Expression<? extends Collection<E>> collectionExpression, Collection<? extends E> subCollection)

Whether a basic collection contains another basic collection with nullable elements.

public <E> JpaPredicate
collectionContainsAllNullable(Collection<E> collection, Expression<? extends Collection<? extends E>> subCollectionExpression)

Whether a basic collection contains another basic collection with nullable elements.

public <E> JpaPredicate
collectionContainsNullable(Expression<? extends Collection<E>> collectionExpression, Expression<? extends E> elementExpression)

Whether a basic collection contains a nullable element.

public <E> JpaPredicate
collectionContainsNullable(Expression<? extends Collection<E>> collectionExpression, E element)

Whether a basic collection contains a nullable element.

public <E> JpaPredicate
collectionContainsNullable(Collection<E> collection, Expression<E> elementExpression)

Whether a basic collection contains a nullable element.

public <T> JpaExpression<Collection<T>>
collectionFill(Expression<T> elementExpression, Expression<Integer> elementCountExpression)

Creates basic collection with the same element N times, as specified by the arguments.

public <T> JpaExpression<Collection<T>>
collectionFill(Expression<T> elementExpression, Integer elementCount)

Creates basic collection with the same element N times, as specified by the arguments.

public <T> JpaExpression<Collection<T>>
collectionFill(T element, Expression<Integer> elementCountExpression)

Creates basic collection with the same element N times, as specified by the arguments.

public <T> JpaExpression<Collection<T>>
collectionFill(T element, Integer elementCount)

Creates basic collection with the same element N times, as specified by the arguments.

public <E> JpaExpression<E>
collectionGet(Expression<? extends Collection<E>> collectionExpression, Expression<Integer> indexExpression)

Accesses the element of the basic collection by 1-based index.

public <E> JpaExpression<E>
collectionGet(Expression<? extends Collection<E>> collectionExpression, Integer index)

Accesses the element of the basic collection by 1-based index.

public JpaExpression<Integer>
collectionLength(Expression<? extends Collection<?>> collectionExpression)

Determines the length of a basic collection.

public <E, C extends Collection<E>> JpaExpression<C>
collectionLiteral(E... elements)

Creates a basic collection literal with the array constructor function.

public <E> JpaPredicate
collectionOverlaps(Expression<? extends Collection<E>> collectionExpression1, Expression<? extends Collection<? extends E>> collectionExpression2)

Whether one basic collection has any elements common with another basic collection.

public <E> JpaPredicate
collectionOverlaps(Expression<? extends Collection<E>> collectionExpression1, Collection<? extends E> collection2)

Whether one basic collection has any elements common with another basic collection.

public <E> JpaPredicate
collectionOverlaps(Collection<E> collection1, Expression<? extends Collection<? extends E>> collectionExpression2)

Whether one basic collection has any elements common with another basic collection.

public <E> JpaPredicate
collectionOverlapsNullable(Expression<? extends Collection<E>> collectionExpression1, Expression<? extends Collection<? extends E>> collectionExpression2)

Whether one basic collection has any elements common with another basic collection, supporting null elements.

public <E> JpaPredicate
collectionOverlapsNullable(Expression<? extends Collection<E>> collectionExpression1, Collection<? extends E> collection2)

Whether one basic collection has any elements common with another basic collection, supporting null elements.

public <E> JpaPredicate
collectionOverlapsNullable(Collection<E> collection1, Expression<? extends Collection<? extends E>> collectionExpression2)

Whether one basic collection has any elements common with another basic collection, supporting null elements.

public <E> JpaExpression<Integer>
collectionPosition(Expression<? extends Collection<? extends E>> collectionExpression, E element)

Determines the 1-based position of an element in a basic collection.

public <E> JpaExpression<Integer>
collectionPosition(Expression<? extends Collection<? extends E>> collectionExpression, Expression<E> elementExpression)

Determines the 1-based position of an element in a basic collection.

public <T> JpaExpression<int[]>
collectionPositions(Expression<? extends Collection<? super T>> collectionExpression, Expression<T> elementExpression)

Determines all 1-based positions of an element in a basic collection.

public <T> JpaExpression<int[]>
collectionPositions(Expression<? extends Collection<? super T>> collectionExpression, T element)

Determines all 1-based positions of an element in a basic collection.

public <T> JpaExpression<List<Integer>>
collectionPositionsList(Expression<? extends Collection<? super T>> collectionExpression, Expression<T> elementExpression)

Determines all 1-based positions of an element in a basic collection.

public <T> JpaExpression<List<Integer>>
collectionPositionsList(Expression<? extends Collection<? super T>> collectionExpression, T element)

Determines all 1-based positions of an element in a basic collection.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionPrepend(Expression<? extends E> elementExpression, Expression<C> collectionExpression)

Prepends element to basic collection.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionPrepend(E element, Expression<C> collectionExpression)

Prepends element to basic collection.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionRemove(Expression<C> collectionExpression, Expression<? extends E> elementExpression)

Creates basic collection copy with given element removed.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionRemove(Expression<C> collectionExpression, E element)

Creates basic collection copy with given element removed.

public <C extends Collection<?>> JpaExpression<C>
collectionRemoveIndex(Expression<C> collectionExpression, Expression<Integer> indexExpression)

Creates basic collection copy with the element at the given 1-based index removed.

public <C extends Collection<?>> JpaExpression<C>
collectionRemoveIndex(Expression<C> collectionExpression, Integer index)

Creates basic collection copy with the element at the given 1-based index removed.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionReplace(Expression<C> collectionExpression, Expression<? extends E> oldElementExpression, Expression<? extends E> newElementExpression)

Creates basic collection copy replacing a given element with another.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionReplace(Expression<C> collectionExpression, Expression<? extends E> oldElementExpression, E newElement)

Creates basic collection copy replacing a given element with another.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionReplace(Expression<C> collectionExpression, E oldElement, Expression<? extends E> newElementExpression)

Creates basic collection copy replacing a given element with another.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionReplace(Expression<C> collectionExpression, E oldElement, E newElement)

Creates basic collection copy replacing a given element with another.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionSet(Expression<C> collectionExpression, Expression<Integer> indexExpression, Expression<? extends E> elementExpression)

Creates basic collection copy with given element at given 1-based index.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionSet(Expression<C> collectionExpression, Expression<Integer> indexExpression, E element)

Creates basic collection copy with given element at given 1-based index.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionSet(Expression<C> collectionExpression, Integer index, Expression<? extends E> elementExpression)

Creates basic collection copy with given element at given 1-based index.

public <E, C extends Collection<? super E>> JpaExpression<C>
collectionSet(Expression<C> collectionExpression, Integer index, E element)

Creates basic collection copy with given element at given 1-based index.

public <C extends Collection<?>> JpaExpression<C>
collectionSlice(Expression<C> collectionExpression, Expression<Integer> lowerIndexExpression, Expression<Integer> upperIndexExpression)

Creates a sub-collection of the based on 1-based lower and upper index.

public <C extends Collection<?>> JpaExpression<C>
collectionSlice(Expression<C> collectionExpression, Expression<Integer> lowerIndexExpression, Integer upperIndex)

Creates a sub-collection of the based on 1-based lower and upper index.

public <C extends Collection<?>> JpaExpression<C>
collectionSlice(Expression<C> collectionExpression, Integer lowerIndex, Expression<Integer> upperIndexExpression)

Creates a sub-collection of the based on 1-based lower and upper index.

public <C extends Collection<?>> JpaExpression<C>
collectionSlice(Expression<C> collectionExpression, Integer lowerIndex, Integer upperIndex)

Creates a sub-collection of the based on 1-based lower and upper index.

public <T> JpaExpression<String>
collectionToString(Expression<? extends Collection<?>> collectionExpression, Expression<String> separatorExpression)

Concatenates the non-null basic collection elements with a separator, as specified by the arguments.

public <T> JpaExpression<String>
collectionToString(Expression<? extends Collection<?>> collectionExpression, String separator)

Concatenates the non-null basic collection elements with a separator, as specified by the arguments.

public <C extends Collection<?>> JpaExpression<C>
collectionTrim(Expression<C> arrayExpression, Expression<Integer> elementCountExpression)

Creates basic collection copy without the last N elements, specified by the second argument.

public <C extends Collection<?>> JpaExpression<C>
collectionTrim(Expression<C> arrayExpression, Integer elementCount)

Creates basic collection copy without the last N elements, specified by the second argument.

public JpaExpression<String>
concat(Expression<String>
string expression
x
,
Expression<String>
string expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.concat.

Create an expression for string concatenation.
public JpaExpression<String>
concat(Expression<String>
string expression
x
,
String
string
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.concat.

Create an expression for string concatenation.
public JpaExpression<String>
concat(String
string
x
,
Expression<String>
string expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.concat.

Create an expression for string concatenation.
public JpaExpression<String>
public JpaPredicate
conjunction()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.conjunction.

Create a conjunction (with zero conjuncts).
public <Y> JpaCompoundSelection<Y>
construct(Class<Y>
class whose instance is to be constructed
resultClass
,
Selection<?>...
arguments to the constructor
selections
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.construct.

Create a selection item corresponding to a constructor.
public <Y> JpaCompoundSelection<Y>
construct(Class<Y> resultClass, List<? extends JpaSelection<?>> arguments)

public JpaExpression<Double>

Returns:

cosine
cos
(Expression<? extends Number>
expression
x
)

Create an expression that returns the cosine of its argument.

public JpaExpression<Double>

Returns:

hyperbolic cosine
cosh
(Expression<? extends Number>
expression
x
)

Create an expression that returns the hyperbolic cosine of its argument.

public JpaExpression<Long>
count(Expression<?>
expression representing input value to count operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.count.

Create an aggregate expression applying the count operation.
public JpaExpression<Long>
count(Expression<?> argument, JpaPredicate filter)

public JpaExpression<Long>
count(Expression<?> argument, JpaWindow window)

public JpaExpression<Long>

Returns:

aggregate function expression
count
(Expression<?>
argument to the function
argument
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
)

Create a count aggregate function expression.

public JpaExpression<Long>
countDistinct(Expression<?>
expression representing input value to count distinct operation
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.countDistinct.

Create an aggregate expression applying the count distinct operation.
public <T> JpaCriteriaDelete<T>
createCriteriaDelete(Class<T>
target type for delete operation
targetEntity
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.createCriteriaDelete.

Create a CriteriaDelete query object to perform a bulk delete operation.
public <T> JpaCriteriaInsertSelect<T>
public <T> JpaCriteriaInsertValues<T>
public <T> JpaCriteriaUpdate<T>
createCriteriaUpdate(Class<T>
target type for update operation
targetEntity
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.createCriteriaUpdate.

Create a CriteriaUpdate query object to perform a bulk update operation.
public JpaCriteriaQuery<Object>
createQuery()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.createQuery.

Create a CriteriaQuery object.
public <T> JpaCriteriaQuery<T>
createQuery(Class<T>
type of the query result
resultClass
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.createQuery.

Create a CriteriaQuery object with the specified result type.
public <T> JpaCriteriaQuery<T>

Returns:

The equivalent criteria query
createQuery
(String
The HQL select query
hql
,
Class<T>
The result type of the query
resultClass
)

Transform the given HQL select query to an equivalent criteria query.

public JpaCriteriaQuery<Tuple>
createTupleQuery()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.createTupleQuery.

Create a CriteriaQuery object that returns a tuple of objects as its result.
public JpaWindow

Returns:

the empty window
createWindow
()

Create an empty JpaWindow to use with window and aggregate functions.

public JpaExpression<Double>

Returns:

window function expression
cumeDist
(JpaWindow
window over which the function will be applied
window
)

Create a cume_dist window function expression.

public JpaFunction<Date>
currentDate()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.currentDate.

Create expression to return current date.
public JpaFunction<Instant>
public JpaFunction<Time>
currentTime()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.currentTime.

Create expression to return current time.
public JpaFunction<Timestamp>
currentTimestamp()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.currentTimestamp.

Create expression to return current timestamp.
public JpaFunction<Integer>

Returns:

the extracted value
day
(Expression<? extends TemporalAccessor>
the date, time, or datetime to extract the value from
datetime
)

Extracts the org.hibernate.query.sqm.TemporalUnit#DAY of a date, time, or datetime expression.

public JpaExpression<Double>

Returns:

degrees
degrees
(Expression<? extends Number>
expression
x
)

Create an expression that converts an angle measured in radians to an approximately equivalent angle measured in degrees.

public JpaExpression<Long>

Returns:

window function expression
denseRank
(JpaWindow
window over which the function will be applied
window
)

Create a dense_rank window function expression.

public JpaOrder
desc(Expression<?>
expression used to define the ordering
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.desc.

Create an ordering by the descending value of the expression.
public JpaOrder

Returns:

descending ordering corresponding to the expression
desc
(Expression<?>
expression used to define the ordering
x
,
boolean
Whether null should be sorted first
nullsFirst
)

Create an ordering by the descending value of the expression.

public JpaSearchOrder

Returns:

descending ordering corresponding to the CTE attribute
desc
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
x
)

Create a search ordering by the descending value of the CTE attribute.

public JpaSearchOrder

Returns:

descending ordering corresponding to the CTE attribute
desc
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
x
,
boolean
Whether null should be sorted first
nullsFirst
)

Create a search ordering by the descending value of the CTE attribute.

public <N extends Number> JpaExpression<N>
diff(Expression<? extends N>
expression
x
,
Expression<? extends N>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.diff, jakarta.persistence.criteria.CriteriaBuilder.diff, jakarta.persistence.criteria.CriteriaBuilder.diff.

Create an expression that returns the difference between its arguments.
public <N extends Number> JpaExpression<N>
diff(Expression<? extends N>
expression
x
,
N
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.diff.

Create an expression that returns the difference between its arguments.
public <N extends Number> JpaExpression<N>
diff(N
value
x
,
Expression<? extends N>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.diff.

Create an expression that returns the difference between its arguments.
public JpaPredicate
disjunction()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.disjunction.

Create a disjunction (with zero disjuncts).
public JpaPredicate
public JpaPredicate
public JpaExpression<Duration>
duration(long magnitude, TemporalUnit unit)

A literal Duration, for example, "five days" or "30 minutes".

public <T extends Temporal> JpaExpression<Duration>
durationBetween(Expression<T> x, Expression<T> y)

Subtract two dates or two datetimes, returning the duration between the two dates or between two datetimes.

public <T extends Temporal> JpaExpression<Duration>
durationBetween(Expression<T> x, T y)

Subtract two dates or two datetimes, returning the duration between the two dates or between two datetimes.

public JpaExpression<Long>

Returns:

the magnitude of the duration measured in the given units
durationByUnit
(TemporalUnit
a choice of temporal granularity
unit
,
Expression<Duration>
the duration in a "unit-free" form
duration
)

Convert a Duration to a numeric magnitude in the given units.

public JpaExpression<Duration>
durationDiff(Expression<Duration> x, Expression<Duration> y)

Subtract one duration from another.

public JpaExpression<Duration>
durationDiff(Expression<Duration> x, Duration y)

Subtract one duration from another.

public JpaExpression<Duration>
durationScaled(Expression<? extends Number> number, Expression<Duration> duration)

Scale a duration by a number.

public JpaExpression<Duration>
durationScaled(Number number, Expression<Duration> duration)

Scale a duration by a number.

public JpaExpression<Duration>
durationScaled(Expression<? extends Number> number, Duration duration)

Scale a duration by a number.

public JpaExpression<Duration>
public JpaExpression<Duration>
public JpaPredicate
equal(Expression<?>
expression
x
,
Expression<?>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.equal.

Create a predicate for testing the arguments for equality.
public JpaPredicate
equal(Expression<?>
expression
x
,
Object
object
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.equal.

Create a predicate for testing the arguments for equality.
public default <T> JpaCriteriaQuery<T>
except(CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public <T> JpaCriteriaQuery<T>
except(boolean all, CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public default <T> JpaSubQuery<T>
except(Subquery<? extends T> query1, Subquery<?>... queries)

public <T> JpaSubQuery<T>
except(boolean all, Subquery<? extends T> query1, Subquery<?>... queries)

public default <T> JpaCriteriaQuery<T>
exceptAll(CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public default <T> JpaSubQuery<T>
exceptAll(Subquery<? extends T> query1, Subquery<?>... queries)

public JpaPredicate
exists(Subquery<?>
subquery whose result is to be tested
subquery
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.exists.

Create a predicate testing the existence of a subquery result.
public JpaExpression<Double>

Returns:

exponential
exp
(Expression<? extends Number>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.exp.

Create an expression that returns the exponential of its argument, that is, Euler's number e raised to the power of its argument.
public <
type of the expression
T
>
JpaExpression<T>

Returns:

window function expression
firstValue
(Expression<T>
argument expression to pass to first_value
argument
,
JpaWindow
window over which the function will be applied
window
)

Create a first_value window function expression.

public <P, F> JpaExpression<F>
fk(Path<P> path)

public <N extends Number> JpaExpression<N>

Returns:

floor
floor
(Expression<N>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.floor.

Create an expression that returns the floor of its argument, that is, the largest integer smaller than or equal to its argument.
public JpaFunction<String>

Returns:

format expression
format
(Expression<? extends TemporalAccessor>
the datetime expression to format
datetime
,
String
the pattern to use for formatting
pattern
)

Format a date, time, or datetime according to a pattern.

public JpaWindowFrame
public JpaWindowFrame

Returns:

the window frame
frameBetweenFollowing
(Expression<?>
the offset expression
offset
)

Create a window frame of type FrameKind#OFFSET_FOLLOWING to use with JpaWindows.

public JpaWindowFrame
public JpaWindowFrame

Returns:

the window frame
frameBetweenPreceding
(Expression<?>
the offset expression
offset
)

Create window frame of type FrameKind#OFFSET_PRECEDING to use with JpaWindows.

public JpaWindowFrame

Returns:

the window frame
frameCurrentRow
()

Create a window frame of type FrameKind#CURRENT_ROW to use with JpaWindows.

public JpaWindowFrame

Returns:

the window frame
frameUnboundedFollowing
()

Create a window frame of type FrameKind#UNBOUNDED_FOLLOWING to use with JpaWindows.

public JpaWindowFrame

Returns:

the window frame
frameUnboundedPreceding
()

Create a window frame of type FrameKind#UNBOUNDED_PRECEDING to use with JpaWindows.

public <T> JpaFunction<T>
function(String
function name
name
,
Class<T>
expected result type
type
,
Expression<?>...
function arguments
args
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.function.

Create an expression for the execution of a database function.
public <T> JpaExpression<T>
functionAggregate(String name, Class<T> type, JpaPredicate filter, Expression<?>... args)

public <T> JpaExpression<T>
functionAggregate(String name, Class<T> type, JpaWindow window, Expression<?>... args)

public <
type of this expression
T
>
JpaExpression<T>

Returns:

aggregate function expression
functionAggregate
(String
name of the ordered set-aggregate function
name
,
Class<T>
type of this expression
type
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<?>...
optional arguments to the function
args
)

Create a generic aggregate function expression.

public <T> JpaExpression<T>
functionWithinGroup(String name, Class<T> type, JpaOrder order, Expression<?>... args)

public <T> JpaExpression<T>
functionWithinGroup(String name, Class<T> type, JpaOrder order, JpaPredicate filter, Expression<?>... args)

public <T> JpaExpression<T>
functionWithinGroup(String name, Class<T> type, JpaOrder order, JpaWindow window, Expression<?>... args)

public <
type of this expression
T
>
JpaExpression<T>

Returns:

ordered set-aggregate function expression
functionWithinGroup
(String
name of the ordered set-aggregate function
name
,
Class<T>
type of this expression
type
,
JpaOrder
order by clause used in within group
order
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<?>...
optional arguments to the function
args
)

Create a generic ordered set-aggregate function expression.

public JpaPredicate
ge(Expression<? extends Number>
expression
x
,
Expression<? extends Number>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.ge.

Create a predicate for testing whether the first argument is greater than or equal to the second.
public JpaPredicate
ge(Expression<? extends Number>
expression
x
,
Number
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.ge.

Create a predicate for testing whether the first argument is greater than or equal to the second.
public <Y extends Comparable<? super Y>> JpaPredicate
greaterThan(Expression<? extends Y>
expression
x
,
Expression<? extends Y>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.greaterThan, jakarta.persistence.criteria.CriteriaBuilder.greaterThan.

Create a predicate for testing whether the first argument is greater than the second.
public <Y extends Comparable<? super Y>> JpaPredicate
greaterThan(Expression<? extends Y>
expression
x
,
Y
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.greaterThan.

Create a predicate for testing whether the first argument is greater than the second.
public <Y extends Comparable<? super Y>> JpaPredicate
greaterThanOrEqualTo(Expression<? extends Y>
expression
x
,
Expression<? extends Y>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.greaterThanOrEqualTo, jakarta.persistence.criteria.CriteriaBuilder.greaterThanOrEqualTo.

Create a predicate for testing whether the first argument is greater than or equal to the second.
public <Y extends Comparable<? super Y>> JpaPredicate
greaterThanOrEqualTo(Expression<? extends Y>
expression
x
,
Y
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.greaterThanOrEqualTo.

Create a predicate for testing whether the first argument is greater than or equal to the second.
public <X extends Comparable<? super X>> JpaExpression<X>
greatest(Expression<X>
expression representing input value to greatest operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.greatest.

Create an aggregate expression for finding the greatest of the values (strings, dates, etc).
public JpaPredicate
gt(Expression<? extends Number>
expression
x
,
Expression<? extends Number>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.gt.

Create a predicate for testing whether the first argument is greater than the second.
public JpaPredicate
gt(Expression<? extends Number>
expression
x
,
Number
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.gt.

Create a predicate for testing whether the first argument is greater than the second.
public JpaFunction<Integer>

Returns:

the extracted value
hour
(Expression<? extends TemporalAccessor>
the date, time, or datetime to extract the value from
datetime
)

Extracts the org.hibernate.query.sqm.TemporalUnit#HOUR of a date, time, or datetime expression.

public JpaPredicate
public JpaPredicate
public JpaPredicate
public JpaPredicate
ilike(Expression<String> x, Expression<String> pattern, char escapeChar)

public JpaPredicate
ilike(Expression<String> x, String pattern, Expression<Character> escapeChar)

public JpaPredicate
ilike(Expression<String> x, String pattern, char escapeChar)

public <T> JpaInPredicate<T>
in(Expression<? extends T>
to be tested against list of values
expression
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.in.

Create predicate to test whether given expression is contained in a list of values.
public <T> JpaInPredicate<T>
in(Expression<? extends T> expression, Expression<? extends T>... values)

public <T> JpaInPredicate<T>
in(Expression<? extends T> expression, T... values)

public <T> JpaInPredicate<T>
in(Expression<? extends T> expression, Collection<T> values)

public <K, L extends List<?>> JpaExpression<Set<K>>
indexes(L list)

public default <T> JpaCriteriaQuery<T>
intersect(CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public <T> JpaCriteriaQuery<T>
intersect(boolean all, CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public default <T> JpaSubQuery<T>
intersect(Subquery<? extends T> query1, Subquery<?>... queries)

public <T> JpaSubQuery<T>
intersect(boolean all, Subquery<? extends T> query1, Subquery<?>... queries)

public default <T> JpaCriteriaQuery<T>
intersectAll(CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public default <T> JpaSubQuery<T>
intersectAll(Subquery<? extends T> query1, Subquery<?>... queries)

public <C extends Collection<?>> JpaPredicate
isEmpty(Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isEmpty.

Create a predicate that tests whether a collection is empty.
public JpaPredicate
isFalse(Expression<Boolean>
expression to be tested
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isFalse.

Create a predicate testing for a false value.
public <M extends Map<?, ?>> JpaPredicate

Returns:

is-empty predicate
isMapEmpty
(JpaExpression<M>
The expression resolving to a Map which we want to check for emptiness
mapExpression
)

Create a predicate that tests whether a Map is empty.

public <M extends Map<?, ?>> JpaPredicate

Returns:

is-not-empty predicate
isMapNotEmpty
(JpaExpression<M>
The expression resolving to a Map which we want to check for non-emptiness
mapExpression
)

Create a predicate that tests whether a Map is not empty.

public <E, C extends Collection<E>> JpaPredicate
isMember(Expression<E>
element expression
elem
,
Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isMember, jakarta.persistence.criteria.CriteriaBuilder.isMember.

Create a predicate that tests whether an element is a member of a collection.
public <E, C extends Collection<E>> JpaPredicate
isMember(E
element
elem
,
Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isMember.

Create a predicate that tests whether an element is a member of a collection.
public <C extends Collection<?>> JpaPredicate
isNotEmpty(Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isNotEmpty.

Create a predicate that tests whether a collection is not empty.
public <E, C extends Collection<E>> JpaPredicate
isNotMember(Expression<E>
element expression
elem
,
Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isNotMember, jakarta.persistence.criteria.CriteriaBuilder.isNotMember.

Create a predicate that tests whether an element is not a member of a collection.
public <E, C extends Collection<E>> JpaPredicate
isNotMember(E
element
elem
,
Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isNotMember.

Create a predicate that tests whether an element is not a member of a collection.
public JpaPredicate
isNotNull(Expression<?>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isNotNull.

Create a predicate to test whether the expression is not null.
public JpaPredicate
isNull(Expression<?>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isNull.

Create a predicate to test whether the expression is null.
public JpaPredicate
isTrue(Expression<Boolean>
expression to be tested
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.isTrue.

Create a predicate testing for a true value.
public <K, M extends Map<K, ?>> JpaExpression<Set<K>>
keys(M
map
map
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.keys.

Create an expression that returns the keys of a map.
public <
type of the expression
T
>
JpaExpression<T>

Returns:

window function expression
lastValue
(Expression<T>
argument expression to pass to last_value
argument
,
JpaWindow
window over which the function will be applied
window
)

Create a last_value window function expression.

public JpaPredicate
le(Expression<? extends Number>
expression
x
,
Expression<? extends Number>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.le.

Create a predicate for testing whether the first argument is less than or equal to the second.
public JpaPredicate
le(Expression<? extends Number>
expression
x
,
Number
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.le.

Create a predicate for testing whether the first argument is less than or equal to the second.
public <X extends Comparable<? super X>> JpaExpression<X>
least(Expression<X>
expression representing input value to least operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.least.

Create an aggregate expression for finding the least of the values (strings, dates, etc).
public JpaFunction<String>
left(Expression<String> x, int length)

public JpaFunction<String>

Returns:

left expression
left
(Expression<String>
original string
x
,
Expression<Integer>
number of characters
length
)

Extract the length leftmost characters of a string.

public JpaFunction<Integer>
length(Expression<String>
string expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.length.

Create expression to return length of a string.
public <Y extends Comparable<? super Y>> JpaPredicate
lessThan(Expression<? extends Y>
expression
x
,
Expression<? extends Y>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lessThan, jakarta.persistence.criteria.CriteriaBuilder.lessThan.

Create a predicate for testing whether the first argument is less than the second.
public <Y extends Comparable<? super Y>> JpaPredicate
lessThan(Expression<? extends Y>
expression
x
,
Y
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lessThan.

Create a predicate for testing whether the first argument is less than the second.
public <Y extends Comparable<? super Y>> JpaPredicate
lessThanOrEqualTo(Expression<? extends Y>
expression
x
,
Expression<? extends Y>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lessThanOrEqualTo, jakarta.persistence.criteria.CriteriaBuilder.lessThanOrEqualTo.

Create a predicate for testing whether the first argument is less than or equal to the second.
public <Y extends Comparable<? super Y>> JpaPredicate
lessThanOrEqualTo(Expression<? extends Y>
expression
x
,
Y
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lessThanOrEqualTo.

Create a predicate for testing whether the first argument is less than or equal to the second.
public JpaPredicate
like(Expression<String>
string expression
x
,
Expression<String>
string expression
pattern
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.like.

Create a predicate for testing whether the expression satisfies the given pattern.
public JpaPredicate
like(Expression<String>
string expression
x
,
String
string
pattern
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.like.

Create a predicate for testing whether the expression satisfies the given pattern.
public JpaPredicate
like(Expression<String>
string expression
x
,
Expression<String>
string expression
pattern
,
Expression<Character>
escape character expression
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.like.

Create a predicate for testing whether the expression satisfies the given pattern.
public JpaPredicate
like(Expression<String>
string expression
x
,
Expression<String>
string expression
pattern
,
char
escape character
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.like.

Create a predicate for testing whether the expression satisfies the given pattern.
public JpaPredicate
like(Expression<String>
string expression
x
,
String
string
pattern
,
Expression<Character>
escape character expression
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.like.

Create a predicate for testing whether the expression satisfies the given pattern.
public JpaPredicate
like(Expression<String>
string expression
x
,
String
string
pattern
,
char
escape character
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.like.

Create a predicate for testing whether the expression satisfies the given pattern.
public JpaExpression<String>
listagg(JpaOrder order, Expression<String> argument, String separator)

public JpaExpression<String>
listagg(JpaOrder order, Expression<String> argument, Expression<String> separator)

public JpaExpression<String>
listagg(JpaOrder order, JpaPredicate filter, Expression<String> argument, String separator)

public JpaExpression<String>
listagg(JpaOrder order, JpaPredicate filter, Expression<String> argument, Expression<String> separator)

public JpaExpression<String>
listagg(JpaOrder order, JpaWindow window, Expression<String> argument, String separator)

public JpaExpression<String>
listagg(JpaOrder order, JpaWindow window, Expression<String> argument, Expression<String> separator)

public JpaExpression<String>
listagg(JpaOrder order, JpaPredicate filter, JpaWindow window, Expression<String> argument, String separator)

public JpaExpression<String>

Returns:

ordered set-aggregate expression
listagg
(JpaOrder
order by clause used in within group
order
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<String>
values to join
argument
,
Expression<String>
the separator used to join the values
separator
)

Create a listagg ordered set-aggregate function expression.

public <T> JpaExpression<T>
literal(T
value represented by the expression
value
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.literal.

Create an expression for a literal.
public <T> List<? extends JpaExpression<T>>
literals(T... values)

public <T> List<? extends JpaExpression<T>>
literals(List<T> values)

public JpaExpression<Double>

Returns:

natural logarithm
ln
(Expression<? extends Number>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.ln.

Create an expression that returns the natural logarithm of its argument.
public JpaExpression<LocalDate>

Returns:

expression for current date
localDate
()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.localDate.

Create expression to return current local date.
public JpaExpression<LocalDateTime>

Returns:

expression for current timestamp
localDateTime
()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.localDateTime.

Create expression to return current local datetime.
public JpaExpression<LocalTime>

Returns:

expression for current time
localTime
()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.localTime.

Create expression to return current local time.
public JpaFunction<Integer>
locate(Expression<String>
expression for string to be searched
x
,
Expression<String>
expression for string to be located
pattern
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.locate.

Create expression to locate the position of one string within another, returning position of first character if found.
public JpaFunction<Integer>
locate(Expression<String>
expression for string to be searched
x
,
String
string to be located
pattern
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.locate.

Create expression to locate the position of one string within another, returning position of first character if found.
public JpaFunction<Integer>
locate(Expression<String>
expression for string to be searched
x
,
Expression<String>
expression for string to be located
pattern
,
Expression<Integer>
expression for position at which to start search
from
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.locate.

Create expression to locate the position of one string within another, returning position of first character if found.
public JpaFunction<Integer>
locate(Expression<String>
expression for string to be searched
x
,
String
string to be located
pattern
,
int
position at which to start search
from
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.locate.

Create expression to locate the position of one string within another, returning position of first character if found.
public JpaExpression<Double>
log(Number b, Expression<? extends Number> x)

public JpaExpression<Double>

Returns:

arbitrary-base logarithm
log
(Expression<? extends Number>
base
b
,
Expression<? extends Number>
expression
x
)

Create an expression that returns the logarithm of x to the base b.

public JpaExpression<Double>

Returns:

base-10 logarithm
log10
(Expression<? extends Number>
expression
x
)

Create an expression that returns the base-10 logarithm of its argument.

public JpaFunction<String>
lower(Expression<String>
string expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lower.

Create expression for converting a string to lowercase.
public JpaPredicate
lt(Expression<? extends Number>
expression
x
,
Expression<? extends Number>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lt.

Create a predicate for testing whether the first argument is less than the second.
public JpaPredicate
lt(Expression<? extends Number>
expression
x
,
Number
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.lt.

Create a predicate for testing whether the first argument is less than the second.
public <M extends Map<?, ?>> JpaExpression<Integer>

Returns:

size expression
mapSize
(JpaExpression<M>
The expression resolving to a Map for which we want to know the size
mapExpression
)

Create an expression that tests the size of a map.

public <M extends Map<?, ?>> JpaExpression<Integer>

Returns:

size expression
mapSize
(M
The Map for which we want to know the size
map
)

Create an expression that tests the size of a map.

public <N extends Number> JpaExpression<N>
max(Expression<N>
expression representing input value to max operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.max.

Create an aggregate expression applying the numerical max operation.
public <N extends Number> JpaExpression<N>
min(Expression<N>
expression representing input value to min operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.min.

Create an aggregate expression applying the numerical min operation.
public JpaFunction<Integer>

Returns:

the extracted value
minute
(Expression<? extends TemporalAccessor>
the date, time, or datetime to extract the value from
datetime
)

Extracts the org.hibernate.query.sqm.TemporalUnit#MINUTE of a date, time, or datetime expression.

public JpaExpression<Integer>
mod(Expression<Integer>
expression
x
,
Expression<Integer>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.mod.

Create an expression that returns the modulus (remainder under integer division) of its arguments.
public JpaExpression<Integer>
mod(Expression<Integer>
expression
x
,
Integer
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.mod.

Create an expression that returns the modulus (remainder under integer division) of its arguments.
public JpaExpression<Integer>
mod(Integer
value
x
,
Expression<Integer>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.mod.

Create an expression that returns the modulus (remainder under integer division) of its arguments.
public <T> JpaExpression<T>
mode(Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>
mode(JpaPredicate filter, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>
mode(JpaWindow window, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <
type of this expression
T
>
JpaExpression<T>

Returns:

ordered set-aggregate expression
mode
(JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<T>
the sort expression
sortExpression
,
SortDirection
the sort order
sortOrder
,
NullPrecedence
the null precedence
nullPrecedence
)

Create a mode ordered set-aggregate function expression.

public JpaFunction<Integer>

Returns:

the extracted value
month
(Expression<? extends TemporalAccessor>
the date, time, or datetime to extract the value from
datetime
)

Extracts the org.hibernate.query.sqm.TemporalUnit#MONTH of a date, time, or datetime expression.

public <N extends Number> JpaExpression<N>
neg(Expression<N>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.neg.

Create an expression that returns the arithmetic negation of its argument.
public JpaPredicate
not(Expression<Boolean>
restriction expression
restriction
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.not.

Create a negation of the given restriction.
public JpaPredicate
public JpaPredicate
public JpaPredicate
notEqual(Expression<?>
expression
x
,
Expression<?>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notEqual.

Create a predicate for testing the arguments for inequality.
public JpaPredicate
notEqual(Expression<?>
expression
x
,
Object
object
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notEqual.

Create a predicate for testing the arguments for inequality.
public JpaPredicate
public JpaPredicate
public JpaPredicate
public JpaPredicate
notIlike(Expression<String> x, Expression<String> pattern, char escapeChar)

public JpaPredicate
public JpaPredicate
notIlike(Expression<String> x, String pattern, char escapeChar)

public JpaPredicate
notLike(Expression<String>
string expression
x
,
Expression<String>
string expression
pattern
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notLike.

Create a predicate for testing whether the expression does not satisfy the given pattern.
public JpaPredicate
notLike(Expression<String>
string expression
x
,
String
string
pattern
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notLike.

Create a predicate for testing whether the expression does not satisfy the given pattern.
public JpaPredicate
notLike(Expression<String>
string expression
x
,
Expression<String>
string expression
pattern
,
Expression<Character>
escape character expression
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notLike.

Create a predicate for testing whether the expression does not satisfy the given pattern.
public JpaPredicate
notLike(Expression<String>
string expression
x
,
Expression<String>
string expression
pattern
,
char
escape character
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notLike.

Create a predicate for testing whether the expression does not satisfy the given pattern.
public JpaPredicate
notLike(Expression<String>
string expression
x
,
String
string
pattern
,
Expression<Character>
escape character expression
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notLike.

Create a predicate for testing whether the expression does not satisfy the given pattern.
public JpaPredicate
notLike(Expression<String>
string expression
x
,
String
string
pattern
,
char
escape character
escapeChar
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.notLike.

Create a predicate for testing whether the expression does not satisfy the given pattern.
public <T> JpaExpression<T>
nthValue(Expression<T> argument, int n, JpaWindow window)

public <
type of the expression
T
>
JpaExpression<T>

Returns:

window function expression
nthValue
(Expression<T>
argument expression to pass to nth_value
argument
,
Expression<Integer>
the N argument for the function
n
,
JpaWindow
window over which the function will be applied
window
)

Create a nth_value window function expression.

public <Y> JpaExpression<Y>
nullif(Expression<Y>
expression
x
,
Expression<?>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.nullif, jakarta.persistence.criteria.CriteriaBuilder.nullif.

Create an expression that tests whether its argument are equal, returning null if they are and the value of the first expression if they are not.
public <Y> JpaExpression<Y>
nullif(Expression<Y>
expression
x
,
Y
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.nullif.

Create an expression that tests whether its argument are equal, returning null if they are and the value of the first expression if they are not.
public <T> JpaExpression<T>
nullLiteral(Class<T>
type of the null literal
resultClass
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.nullLiteral.

Create an expression for a null literal with the given type.
public JpaPredicate
or(Expression<Boolean>
boolean expression
x
,
Expression<Boolean>
boolean expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.or.

Create a disjunction of the given boolean expressions.
public JpaPredicate
or(Predicate...
zero or more restriction predicates
restrictions
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.or.

Create a disjunction of the given restriction predicates.
public JpaFunction<String>
overlay(Expression<String> string, String replacement, int start)

public JpaFunction<String>
overlay(Expression<String> string, Expression<String> replacement, int start)

public JpaFunction<String>
overlay(Expression<String> string, String replacement, Expression<Integer> start)

public JpaFunction<String>
overlay(Expression<String> string, Expression<String> replacement, Expression<Integer> start)

public JpaFunction<String>
overlay(Expression<String> string, String replacement, int start, int length)

public JpaFunction<String>
overlay(Expression<String> string, Expression<String> replacement, int start, int length)

public JpaFunction<String>
overlay(Expression<String> string, String replacement, Expression<Integer> start, int length)

public JpaFunction<String>
overlay(Expression<String> string, Expression<String> replacement, Expression<Integer> start, int length)

public JpaFunction<String>
overlay(Expression<String> string, String replacement, int start, Expression<Integer> length)

public JpaFunction<String>
overlay(Expression<String> string, Expression<String> replacement, int start, Expression<Integer> length)

public JpaFunction<String>
overlay(Expression<String> string, String replacement, Expression<Integer> start, Expression<Integer> length)

public JpaFunction<String>

Returns:

overlay expression
overlay
(Expression<String>
string expression to be manipulated
string
,
Expression<String>
string expression to replace in original
replacement
,
Expression<Integer>
start position
start
,
Expression<Integer>
optional, number of characters to substitute
length
)

Overlay the string expression with the replacement expression, starting from index start and substituting a number of characters corresponding to the length of the replacement expression or the length parameter if specified.

public JpaFunction<String>
pad(Expression<String> x, int length)

public JpaFunction<String>
public JpaFunction<String>
public JpaFunction<String>
public JpaFunction<String>
pad(Expression<String> x, int length, char padChar)

public JpaFunction<String>
pad(CriteriaBuilder.Trimspec ts, Expression<String> x, int length, char padChar)

public JpaFunction<String>
pad(Expression<String> x, Expression<Integer> length, char padChar)

public JpaFunction<String>
public JpaFunction<String>
pad(Expression<String> x, int length, Expression<Character> padChar)

public JpaFunction<String>
public JpaFunction<String>
public JpaFunction<String>

Returns:

pad expression
pad
(CriteriaBuilder.Trimspec ts, Expression<String>
string expression to pad
x
,
Expression<Integer>
length of the result string after padding
length
,
Expression<Character>
optional pad character
padChar
)

Pad the specified string expression with whitespace or with the padChar character if specified.

public <T> JpaParameterExpression<T>
parameter(Class<T>
parameter class
paramClass
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.parameter.

Create a parameter expression.
public <T> JpaParameterExpression<T>
parameter(Class<T>
parameter class
paramClass
,
String
name that can be used to refer to the parameter
name
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.parameter.

Create a parameter expression with the given name.
public <T> JpaExpression<T>
percentileCont(Expression<? extends Number> argument, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>
percentileCont(Expression<? extends Number> argument, JpaPredicate filter, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>
percentileCont(Expression<? extends Number> argument, JpaWindow window, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>

Returns:

ordered set-aggregate expression
percentileCont
(Expression<? extends Number>
argument to the function
argument
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<T>
the sort expression
sortExpression
,
SortDirection
the sort order
sortOrder
,
NullPrecedence
the null precedence
nullPrecedence
)

Create a percentile_cont ordered set-aggregate function expression.

public <T> JpaExpression<T>
percentileDisc(Expression<? extends Number> argument, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>
percentileDisc(Expression<? extends Number> argument, JpaPredicate filter, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>
percentileDisc(Expression<? extends Number> argument, JpaWindow window, Expression<T> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public <T> JpaExpression<T>

Returns:

ordered set-aggregate expression
percentileDisc
(Expression<? extends Number>
argument to the function
argument
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<T>
the sort expression
sortExpression
,
SortDirection
the sort order
sortOrder
,
NullPrecedence
the null precedence
nullPrecedence
)

Create a percentile_disc ordered set-aggregate function expression.

public JpaExpression<Double>

Returns:

window function expression
percentRank
(JpaWindow
window over which the function will be applied
window
)

Create a percent_rank window function expression.

public JpaExpression<Double>
percentRank(JpaOrder order, Expression<?>... arguments)

public JpaExpression<Double>
percentRank(JpaOrder order, JpaPredicate filter, Expression<?>... arguments)

public JpaExpression<Double>
percentRank(JpaOrder order, JpaWindow window, Expression<?>... arguments)

public JpaExpression<Double>

Returns:

ordered set-aggregate expression
percentRank
(JpaOrder
order by clause used in within group
order
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<?>...
arguments to the function
arguments
)

Create a percent_rank ordered set-aggregate function expression.

public JpaExpression<Double>

Returns:

pi expression
pi
()

Literal expression corresponding to the value of pi.

public JpaExpression<Double>

Returns:

the base raised to the power of the exponent
power
(Expression<? extends Number>
base
x
,
Expression<? extends Number>
exponent
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.power.

Create an expression that returns the first argument raised to the power of its second argument.
public JpaExpression<Double>

Returns:

the base raised to the power of the exponent
power
(Expression<? extends Number>
base
x
,
Number
exponent
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.power.

Create an expression that returns the first argument raised to the power of its second argument.
public <N extends Number> JpaExpression<N>
prod(Expression<? extends N>
expression
x
,
Expression<? extends N>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.prod, jakarta.persistence.criteria.CriteriaBuilder.prod, jakarta.persistence.criteria.CriteriaBuilder.prod.

Create an expression that returns the product of its arguments.
public <N extends Number> JpaExpression<N>
prod(Expression<? extends N>
expression
x
,
N
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.prod.

Create an expression that returns the product of its arguments.
public <N extends Number> JpaExpression<N>
prod(N
value
x
,
Expression<? extends N>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.prod.

Create an expression that returns the product of its arguments.
public JpaExpression<Number>
quot(Expression<? extends Number>
expression
x
,
Expression<? extends Number>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.quot.

Create an expression that returns the quotient of its arguments.
public JpaExpression<Number>
quot(Expression<? extends Number>
expression
x
,
Number
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.quot.

Create an expression that returns the quotient of its arguments.
public JpaExpression<Number>
quot(Number
value
x
,
Expression<? extends Number>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.quot.

Create an expression that returns the quotient of its arguments.
public JpaExpression<Double>

Returns:

radians
radians
(Expression<? extends Number>
expression
x
)

Create an expression that converts an angle measured in degrees to an approximately equivalent angle measured in radians.

public JpaExpression<Long>

Returns:

window function expression
rank
(JpaWindow
window over which the function will be applied
window
)

Create a rank window function expression.

public JpaExpression<Long>
rank(JpaOrder order, Expression<?>... arguments)

public JpaExpression<Long>
rank(JpaOrder order, JpaPredicate filter, Expression<?>... arguments)

public JpaExpression<Long>
rank(JpaOrder order, JpaWindow window, Expression<?>... arguments)

public JpaExpression<Long>

Returns:

ordered set-aggregate expression
rank
(JpaOrder
order by clause used in within group
order
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
,
Expression<?>...
arguments to the function
arguments
)

Create a rank ordered set-aggregate function expression.

public JpaFunction<String>

Returns:

repeat expression
repeat
(Expression<String>
the string expression to concatenate
x
,
Expression<Integer>
the number of times it should be repeated
times
)

Concatenate the given string expression with itself the given number of times.

public JpaFunction<String>

Returns:

repeat expression
repeat
(Expression<String>
the string expression to concatenate
x
,
int
the number of times it should be repeated
times
)

Concatenate the given string expression with itself the given number of times.

public JpaFunction<String>

Returns:

repeat expression
repeat
(String
the string expression to concatenate
x
,
Expression<Integer>
the number of times it should be repeated
times
)

Concatenate the given string expression with itself the given number of times.

public JpaFunction<String>
replace(Expression<String> x, String pattern, String replacement)

public JpaFunction<String>
replace(Expression<String> x, String pattern, Expression<String> replacement)

public JpaFunction<String>
replace(Expression<String> x, Expression<String> pattern, String replacement)

public JpaFunction<String>

Returns:

replace expression
replace
(Expression<String>
original string
x
,
Expression<String>
the string to be replaced
pattern
,
Expression<String>
the new replacement string
replacement
)

Replace all occurrences of pattern within the original string with replacement.

public JpaFunction<String>
right(Expression<String> x, int length)

public JpaFunction<String>

Returns:

left expression
right
(Expression<String>
original string
x
,
Expression<Integer>
number of characters
length
)

Extract the length rightmost characters of a string.

public <T extends Number> JpaExpression<T>

Returns:

the rounded value
round
(Expression<T>
base
x
,
Integer
number of decimal places
n
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.round.

Create an expression that returns the first argument rounded to the number of decimal places given by the second argument.
public JpaExpression<Long>

Returns:

window function expression
rowNumber
(JpaWindow
window over which the function will be applied
window
)

Create a row_number window function expression.

public JpaSearchOrder

Returns:

ordering corresponding to the CTE attribute
search
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
cteAttribute
,
SortDirection
The sort order
sortOrder
,
NullPrecedence
The null precedence
nullPrecedence
)

Create a search ordering based on the sort order and null precedence of the value of the CTE attribute.

public JpaSearchOrder

Returns:

ordering corresponding to the CTE attribute
search
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
cteAttribute
,
SortDirection
The sort order
sortOrder
)

Create a search ordering based on the sort order of the value of the CTE attribute.

public JpaSearchOrder

Returns:

ascending ordering corresponding to the CTE attribute
search
(JpaCteCriteriaAttribute
CTE attribute used to define the ordering
cteAttribute
)

Create a search ordering based on the ascending value of the CTE attribute.

public JpaFunction<Float>

Returns:

the extracted value
second
(Expression<? extends TemporalAccessor>
the date, time, or datetime to extract the value from
datetime
)

Extracts the org.hibernate.query.sqm.TemporalUnit#SECOND of a date, time, or datetime expression.

public <C, R> JpaSimpleCase<C, R>
selectCase(Expression<? extends C>
to be tested against the case conditions
expression
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.selectCase.

Create a simple case expression.
public <R> JpaSearchedCase<R>
selectCase()

Redeclares jakarta.persistence.criteria.CriteriaBuilder.selectCase.

Create a general case expression.
public JpaExpression<Integer>

Returns:

sign
sign
(Expression<? extends Number>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sign.

Create an expression that returns the sign of its argument, that is, 1 if its argument is positive, -1 if its argument is negative, or 0 if its argument is exactly zero.
public JpaExpression<Double>

Returns:

sine
sin
(Expression<? extends Number>
expression
x
)

Create an expression that returns the sine of its argument.

public JpaExpression<Double>

Returns:

hyperbolic sine
sinh
(Expression<? extends Number>
expression
x
)

Create an expression that returns the hyperbolic sine of its argument.

public <C extends Collection<?>> JpaExpression<Integer>
size(Expression<C>
expression
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.size, jakarta.persistence.criteria.CriteriaBuilder.size.

Create an expression that tests the size of a collection.
public <C extends Collection<?>> JpaExpression<Integer>
size(C
collection
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.size.

Create an expression that tests the size of a collection.
public <Y> JpaExpression<Y>
some(Subquery<Y>
subquery
subquery
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.some.

Create a some expression over the subquery results.
public JpaOrder
sort(JpaExpression<?> sortExpression, SortDirection sortOrder, NullPrecedence nullPrecedence)

public JpaOrder
sort(JpaExpression<?> sortExpression, SortDirection sortOrder)

public JpaOrder
sort(JpaExpression<?> sortExpression)

public <
type of this expression
T
>
JpaExpression<T>

Returns:

native SQL expression
sql
(String
native SQL pattern
pattern
,
Class<T>
type of this expression
type
,
Expression<?>...
optional arguments to the SQL pattern
arguments
)

Embed native pattern that will be unquoted and embedded in the generated SQL.

public JpaExpression<Double>
sqrt(Expression<? extends Number>
expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sqrt.

Create an expression that returns the square root of its argument.
public JpaFunction<String>
substring(Expression<String>
string expression
x
,
Expression<Integer>
start position expression
from
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.substring.

Create an expression for substring extraction.
public JpaFunction<String>
substring(Expression<String>
string expression
x
,
int
start position
from
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.substring.

Create an expression for substring extraction.
public JpaFunction<String>
substring(Expression<String>
string expression
x
,
Expression<Integer>
start position expression
from
,
Expression<Integer>
length expression
len
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.substring.

Create an expression for substring extraction.
public JpaFunction<String>
substring(Expression<String>
string expression
x
,
int
start position
from
,
int
length
len
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.substring.

Create an expression for substring extraction.
public <T extends Temporal> JpaExpression<T>
subtractDuration(Expression<T> datetime, Expression<Duration> duration)

Subtract a duration to a date or datetime, that is, return an earlier date or datetime which is separated from the given date or datetime by the given duration.

public <T extends Temporal> JpaExpression<T>
subtractDuration(Expression<T> datetime, Duration duration)

Subtract a duration to a date or datetime, that is, return an earlier date or datetime which is separated from the given date or datetime by the given duration.

public <T extends Temporal> JpaExpression<T>
subtractDuration(T datetime, Expression<Duration> duration)

Subtract a duration to a date or datetime, that is, return an earlier date or datetime which is separated from the given date or datetime by the given duration.

public <N extends Number> JpaExpression<N>
sum(Expression<N>
expression representing input value to sum operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sum.

Create an aggregate expression applying the sum operation.
public <N extends Number> JpaExpression<N>
sum(Expression<? extends N>
expression
x
,
Expression<? extends N>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sum, jakarta.persistence.criteria.CriteriaBuilder.sum, jakarta.persistence.criteria.CriteriaBuilder.sum.

Create an expression that returns the sum of its arguments.
public <N extends Number> JpaExpression<N>
sum(Expression<? extends N>
expression
x
,
N
value
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sum.

Create an expression that returns the sum of its arguments.
public <N extends Number> JpaExpression<N>
sum(N
value
x
,
Expression<? extends N>
expression
y
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sum.

Create an expression that returns the sum of its arguments.
public <N extends Number> JpaExpression<Number>
sum(Expression<N>
expression
argument
,
JpaPredicate
value
filter
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sum.

Create an expression that returns the sum of its arguments.
public <N extends Number> JpaExpression<Number>
sum(Expression<N>
expression
argument
,
JpaWindow
value
window
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sum.

Create an expression that returns the sum of its arguments.
public <
type of the input expression
N extends Number
>
JpaExpression<Number>

Returns:

aggregate function expression
sum
(Expression<N>
argument to the function
argument
,
JpaPredicate
optional filter clause
filter
,
JpaWindow
optional window over which to apply the function
window
)

Create a sum aggregate function expression.

public JpaExpression<Double>
sumAsDouble(Expression<Float>
expression representing input value to sum operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sumAsDouble.

Create an aggregate expression applying the sum operation to a Float-valued expression, returning a Double result.
public JpaExpression<Long>
sumAsLong(Expression<Integer>
expression representing input value to sum operation
argument
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.sumAsLong.

Create an aggregate expression applying the sum operation to an Integer-valued expression, returning a Long result.
public JpaExpression<Double>

Returns:

tangent
tan
(Expression<? extends Number>
expression
x
)

Create an expression that returns the tangent of its argument.

public JpaExpression<Double>

Returns:

hyperbolic tangent
tanh
(Expression<? extends Number>
expression
x
)

Create an expression that returns the hyperbolic tangent of its argument.

public JpaExpression<BigDecimal>
toBigDecimal(Expression<? extends Number>
numeric expression
number
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.toBigDecimal.

Typecast.
public JpaExpression<BigInteger>
toBigInteger(Expression<? extends Number>
numeric expression
number
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.toBigInteger.

Typecast.
public JpaExpression<Double>
toDouble(Expression<? extends Number>
numeric expression
number
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.toDouble.

Typecast.
public JpaExpression<Float>
toFloat(Expression<? extends Number>
numeric expression
number
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.toFloat.

Typecast.
public JpaExpression<Integer>
toInteger(Expression<? extends Number>
numeric expression
number
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.toInteger.

Typecast.
public JpaExpression<Long>
toLong(Expression<? extends Number>
numeric expression
number
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.toLong.

Typecast.
public JpaExpression<String>
public <X, T extends X> JpaPath<T>
treat(Path<X>
path
path
,
Class<T>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast Path object to the specified type.
public <X, T extends X> JpaRoot<T>
treat(Root<X>
root
root
,
Class<T>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast Root object to the specified type.
public <X, T, V extends T> JpaJoin<X, V>
treat(Join<X, T>
Join object
join
,
Class<V>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast Join object to the specified type.
public <X, T, E extends T> JpaCollectionJoin<X, E>
treat(CollectionJoin<X, T>
CollectionJoin object
join
,
Class<E>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast CollectionJoin object to the specified type.
public <X, T, E extends T> JpaSetJoin<X, E>
treat(SetJoin<X, T>
SetJoin object
join
,
Class<E>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast SetJoin object to the specified type.
public <X, T, E extends T> JpaListJoin<X, E>
treat(ListJoin<X, T>
ListJoin object
join
,
Class<E>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast ListJoin object to the specified type.
public <X, K, T, V extends T> JpaMapJoin<X, K, V>
treat(MapJoin<X, K, T>
MapJoin object
join
,
Class<V>
type to be downcast to
type
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.treat.

Downcast MapJoin object to the specified type.
public JpaFunction<String>
trim(Expression<String>
expression for string to trim
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.trim.

Create expression to trim blanks from both ends of a string.
public JpaFunction<String>
trim(CriteriaBuilder.Trimspec
trim specification
ts
,
Expression<String>
expression for string to trim
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.trim.

Create expression to trim blanks from a string.
public JpaFunction<String>
trim(Expression<Character>
expression for character to be trimmed
t
,
Expression<String>
expression for string to trim
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.trim.

Create expression to trim character from both ends of a string.
public JpaFunction<String>
trim(CriteriaBuilder.Trimspec
trim specification
ts
,
Expression<Character>
expression for character to be trimmed
t
,
Expression<String>
expression for string to trim
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.trim.

Create expression to trim character from a string.
public JpaFunction<String>
trim(char
character to be trimmed
t
,
Expression<String>
expression for string to trim
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.trim.

Create expression to trim character from both ends of a string.
public JpaFunction<String>
trim(CriteriaBuilder.Trimspec
trim specification
ts
,
char
character to be trimmed
t
,
Expression<String>
expression for string to trim
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.trim.

Create expression to trim character from a string.
public <T extends Number> JpaExpression<T>

Returns:

the truncated value
truncate
(Expression<T>
base
x
,
Integer
number of decimal places
n
)

Create an expression that returns the first argument truncated to the number of decimal places given by the second argument.

public <T extends TemporalAccessor> JpaFunction<T>

Returns:

the truncated value
truncate
(Expression<T>
the date, time or datetime expression to be truncated
datetime
,
TemporalUnit
the temporal unit for truncation
temporalUnit
)

Truncates a date, time or datetime expression to the given TemporalUnit.

public JpaCompoundSelection<Tuple>
tuple(Selection<?>...
selection items
selections
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.tuple.

Create a tuple-valued selection item.
public JpaCompoundSelection<Tuple>
tuple(List<? extends JpaSelection<?>> selections)

public default <T> JpaCriteriaQuery<T>
union(CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public <T> JpaCriteriaQuery<T>
union(boolean all, CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public default <T> JpaSubQuery<T>
union(Subquery<? extends T> query1, Subquery<?>... queries)

public <T> JpaSubQuery<T>
union(boolean all, Subquery<? extends T> query1, Subquery<?>... queries)

public default <T> JpaCriteriaQuery<T>
unionAll(CriteriaQuery<? extends T> query1, CriteriaQuery<?>... queries)

public default <T> JpaSubQuery<T>
unionAll(Subquery<? extends T> query1, Subquery<?>... queries)

public <T extends HibernateCriteriaBuilder> T
unwrap(Class<T> clazz)

public JpaFunction<String>
upper(Expression<String>
string expression
x
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.upper.

Create expression for converting a string to uppercase.
public <T> JpaExpression<T>
value(T value)

public <V, C extends Collection<V>> JpaExpression<Collection<V>>
values(C
map
collection
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.values.

Create an expression that returns the values of a map.
public <V, M extends Map<?, V>> Expression<Collection<V>>
values(M
map
map
)

Redeclares jakarta.persistence.criteria.CriteriaBuilder.values.

Create an expression that returns the values of a map.
public <
type of this expression
T
>
JpaExpression<T>

Returns:

window function expression
windowFunction
(String
name of the window function
name
,
Class<T>
type of this expression
type
,
JpaWindow
window over which the function will be applied
window
,
Expression<?>...
arguments to the function
args
)

Create a generic window function expression that will be applied over the specified window.

public JpaPredicate
wrap(Expression<Boolean> expression)

public JpaPredicate
wrap(Expression<Boolean>... expressions)

public JpaFunction<Integer>

Returns:

the extracted value
year
(Expression<? extends TemporalAccessor>
the date, time, or datetime to extract the value from
datetime
)

Extracts the org.hibernate.query.sqm.TemporalUnit#YEAR of a date, time, or datetime expression.