Interface BlazeCriteriaBuilder
- All Superinterfaces:
CriteriaBuilder
public interface BlazeCriteriaBuilder extends CriteriaBuilder
An extended version of
CriteriaBuilder
.- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.persistence.criteria.CriteriaBuilder
CriteriaBuilder.Case<R extends Object>, CriteriaBuilder.Coalesce<T extends Object>, CriteriaBuilder.In<T extends Object>, CriteriaBuilder.SimpleCase<C extends Object,R extends Object>, CriteriaBuilder.Trimspec
-
Method Summary
Modifier and Type Method Description BlazeOrder
asc(Expression<?> x)
BlazeOrder
asc(Expression<?> x, boolean nullsFirst)
LikeCriteriaBuilder.asc(Expression)
but allows to also specify the null precedence.<T> BlazeCriteriaDelete<T>
createCriteriaDelete(Class<T> targetEntity)
Create a query object to perform a bulk delete operation.<T> BlazeCriteriaDelete<T>
createCriteriaDelete(Class<T> targetEntity, String alias)
LikecreateCriteriaDelete(Class)
but also sets the alias for the entity.<T> BlazeCriteriaUpdate<T>
createCriteriaUpdate(Class<T> targetEntity)
Create a query object to perform a bulk update operation.<T> BlazeCriteriaUpdate<T>
createCriteriaUpdate(Class<T> targetEntity, String alias)
LikecreateCriteriaUpdate(Class)
but also sets the alias for the entity.BlazeCriteriaQuery<Object>
createQuery()
<T> BlazeCriteriaQuery<T>
createQuery(Class<T> resultClass)
BlazeCriteriaQuery<Tuple>
createTupleQuery()
BlazeOrder
desc(Expression<?> x)
BlazeOrder
desc(Expression<?> x, boolean nullsFirst)
LikeCriteriaBuilder.desc(Expression)
but allows to also specify the null precedence.<C extends Map<?, ?>>
PredicateisMapEmpty(Expression<C> map)
Create a predicate that tests whether a map is empty.<C extends Map<?, ?>>
PredicateisMapNotEmpty(Expression<C> map)
Create a predicate that tests whether a map is not empty.<C extends Map<?, ?>>
Expression<Integer>mapSize(C map)
Create an expression that tests the size of a map.<C extends Map<?, ?>>
Expression<Integer>mapSize(Expression<C> map)
Create an expression that tests the size of a map.<X, T, E extends T>
BlazeCollectionJoin<X,E>treat(BlazeCollectionJoin<X,T> join, Class<E> type)
Downcast CollectionJoin object to the specified type.<X, T, V extends T>
BlazeJoin<X,V>treat(BlazeJoin<X,T> join, Class<V> type)
Downcast Join object to the specified type.<X, T, E extends T>
BlazeListJoin<X,E>treat(BlazeListJoin<X,T> join, Class<E> type)
Downcast ListJoin object to the specified type.<X, K, T, V extends T>
BlazeMapJoin<X,K,V>treat(BlazeMapJoin<X,K,T> join, Class<V> type)
Downcast MapJoin object to the specified type.<X, T extends X>
BlazePath<T>treat(BlazePath<X> path, Class<T> type)
Downcast Path object to the specified type.<X, T extends X>
BlazeRoot<T>treat(BlazeRoot<X> root, Class<T> type)
Downcast Root object to the specified type.<X, T, E extends T>
BlazeSetJoin<X,E>treat(BlazeSetJoin<X,T> join, Class<E> type)
Downcast SetJoin object to the specified type.<X, T, E extends T>
BlazeCollectionJoin<X,E>treat(CollectionJoin<X,T> join, Class<E> type)
Downcast CollectionJoin object to the specified type.<X, T, V extends T>
BlazeJoin<X,V>treat(Join<X,T> join, Class<V> type)
Downcast Join object to the specified type.<X, T, E extends T>
BlazeListJoin<X,E>treat(ListJoin<X,T> join, Class<E> type)
Downcast ListJoin object to the specified type.<X, K, T, V extends T>
BlazeMapJoin<X,K,V>treat(MapJoin<X,K,T> join, Class<V> type)
Downcast MapJoin object to the specified type.<X, T extends X>
BlazePath<T>treat(Path<X> path, Class<T> type)
Downcast Path object to the specified type.<X, T extends X>
BlazeRoot<T>treat(Root<X> root, Class<T> type)
Downcast Root object to the specified type.<X, T, E extends T>
BlazeSetJoin<X,E>treat(SetJoin<X,T> join, Class<E> type)
Downcast SetJoin object to the specified type.Methods inherited from interface javax.persistence.criteria.CriteriaBuilder
abs, all, and, and, any, array, avg, between, between, coalesce, coalesce, coalesce, concat, concat, concat, conjunction, construct, count, countDistinct, currentDate, currentTime, currentTimestamp, diff, diff, diff, disjunction, equal, equal, exists, function, ge, ge, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, greatest, gt, gt, in, isEmpty, isFalse, isMember, isMember, isNotEmpty, isNotMember, isNotMember, isNotNull, isNull, isTrue, keys, le, le, least, length, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, like, like, like, like, like, like, literal, locate, locate, locate, locate, lower, lt, lt, max, min, mod, mod, mod, neg, not, notEqual, notEqual, notLike, notLike, notLike, notLike, notLike, notLike, nullif, nullif, nullLiteral, or, or, parameter, parameter, prod, prod, prod, quot, quot, quot, selectCase, selectCase, size, size, some, sqrt, substring, substring, substring, substring, sum, sum, sum, sum, sumAsDouble, sumAsLong, toBigDecimal, toBigInteger, toDouble, toFloat, toInteger, toLong, toString, trim, trim, trim, trim, trim, trim, tuple, upper, values
-
Method Details
-
isMapEmpty
Create a predicate that tests whether a map is empty.- Type Parameters:
C
- map type- Parameters:
map
- expression- Returns:
- is-empty predicate
-
isMapNotEmpty
Create a predicate that tests whether a map is not empty.- Type Parameters:
C
- map type- Parameters:
map
- expression- Returns:
- is-not-empty predicate
-
mapSize
Create an expression that tests the size of a map.- Type Parameters:
C
- map type- Parameters:
map
- map- Returns:
- size expression
-
mapSize
Create an expression that tests the size of a map.- Type Parameters:
C
- map type- Parameters:
map
- map- Returns:
- size expression
-
asc
LikeCriteriaBuilder.asc(Expression)
but allows to also specify the null precedence.- Parameters:
x
- The expression used to define the orderingnullsFirst
- True if nulls should be first, false otherwise- Returns:
- ascending ordering corresponding to the expression
-
desc
LikeCriteriaBuilder.desc(Expression)
but allows to also specify the null precedence.- Parameters:
x
- The expression used to define the orderingnullsFirst
- True if nulls should be first, false otherwise- Returns:
- descending ordering corresponding to the expression
-
createCriteriaUpdate
LikecreateCriteriaUpdate(Class)
but also sets the alias for the entity.- Type Parameters:
T
- The type of the entity- Parameters:
targetEntity
- target type for update operationalias
- The alias for the entity- Returns:
- the query object
-
createCriteriaDelete
LikecreateCriteriaDelete(Class)
but also sets the alias for the entity.- Type Parameters:
T
- The type of the entity- Parameters:
targetEntity
- target type for delete operationalias
- The alias for the entity- Returns:
- the query object
-
asc
- Specified by:
asc
in interfaceCriteriaBuilder
-
desc
- Specified by:
desc
in interfaceCriteriaBuilder
-
createQuery
BlazeCriteriaQuery<Object> createQuery()- Specified by:
createQuery
in interfaceCriteriaBuilder
-
createQuery
- Specified by:
createQuery
in interfaceCriteriaBuilder
-
createTupleQuery
BlazeCriteriaQuery<Tuple> createTupleQuery()- Specified by:
createTupleQuery
in interfaceCriteriaBuilder
-
createCriteriaUpdate
Create a query object to perform a bulk update operation.- Type Parameters:
T
- The type of the entity- Parameters:
targetEntity
- target type for update operation- Returns:
- the query object
-
createCriteriaDelete
Create a query object to perform a bulk delete operation.- Type Parameters:
T
- The type of the entity- Parameters:
targetEntity
- target type for delete operation- Returns:
- the query object
-
treat
Downcast Join object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationV
- The target treat type- Parameters:
join
- Join objecttype
- type to be downcast to- Returns:
- Join object of the specified type
-
treat
Downcast CollectionJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationE
- The target treat type- Parameters:
join
- CollectionJoin objecttype
- type to be downcast to- Returns:
- CollectionJoin object of the specified type
-
treat
Downcast SetJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationE
- The target treat type- Parameters:
join
- SetJoin objecttype
- type to be downcast to- Returns:
- SetJoin object of the specified type
-
treat
Downcast ListJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationE
- The target treat type- Parameters:
join
- ListJoin objecttype
- type to be downcast to- Returns:
- ListJoin object of the specified type
-
treat
Downcast MapJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationK
- The key type of the joined relationV
- The target treat type- Parameters:
join
- MapJoin objecttype
- type to be downcast to- Returns:
- MapJoin object of the specified type
-
treat
Downcast Path object to the specified type.- Type Parameters:
X
- The path typeT
- The target treat type- Parameters:
path
- pathtype
- type to be downcast to- Returns:
- Path object of the specified type
-
treat
Downcast Root object to the specified type.- Type Parameters:
X
- The root typeT
- The target treat type- Parameters:
root
- roottype
- type to be downcast to- Returns:
- Path object of the specified type
-
treat
Downcast Join object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationV
- The target treat type- Parameters:
join
- Join objecttype
- type to be downcast to- Returns:
- Join object of the specified type
-
treat
<X, T, E extends T> BlazeCollectionJoin<X,E> treat(BlazeCollectionJoin<X,T> join, Class<E> type)Downcast CollectionJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationE
- The target treat type- Parameters:
join
- CollectionJoin objecttype
- type to be downcast to- Returns:
- CollectionJoin object of the specified type
-
treat
Downcast SetJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationE
- The target treat type- Parameters:
join
- SetJoin objecttype
- type to be downcast to- Returns:
- SetJoin object of the specified type
-
treat
Downcast ListJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationE
- The target treat type- Parameters:
join
- ListJoin objecttype
- type to be downcast to- Returns:
- ListJoin object of the specified type
-
treat
Downcast MapJoin object to the specified type.- Type Parameters:
X
- The source typeT
- The type of the joined relationK
- The key type of the joined relationV
- The target treat type- Parameters:
join
- MapJoin objecttype
- type to be downcast to- Returns:
- MapJoin object of the specified type
-
treat
Downcast Path object to the specified type.- Type Parameters:
X
- The path typeT
- The target treat type- Parameters:
path
- pathtype
- type to be downcast to- Returns:
- Path object of the specified type
-
treat
Downcast Root object to the specified type.- Type Parameters:
X
- The root typeT
- The target treat type- Parameters:
root
- roottype
- type to be downcast to- Returns:
- Path object of the specified type
-