public final class JPAExpressions
extends java.lang.Object
JPAExpressions
provides factory methods for JPQL specific operations
elements.Modifier and Type | Method and Description |
---|---|
static <A extends java.lang.Comparable<? super A>> |
avg(CollectionExpression<?,A> col)
Create a avg(col) expression
|
static <A extends java.lang.Comparable<? super A>> |
max(CollectionExpression<?,A> left)
Create a max(col) expression
|
static <A extends java.lang.Comparable<? super A>> |
min(CollectionExpression<?,A> left)
Create a min(col) expression
|
static JPQLQuery<Tuple> |
select(Expression<?>... exprs)
Create a new detached JPQLQuery instance with the given projection
|
static <T> JPQLQuery<T> |
select(Expression<T> expr)
Create a new detached JPQLQuery instance with the given projection
|
static JPQLQuery<Tuple> |
selectDistinct(Expression<?>... exprs)
Create a new detached JPQLQuery instance with the given projection
|
static <T> JPQLQuery<T> |
selectDistinct(Expression<T> expr)
Create a new detached JPQLQuery instance with the given projection
|
static <T> JPQLQuery<T> |
selectFrom(EntityPath<T> expr)
Create a new detached JPQLQuery instance with the given projection
|
static JPQLQuery<java.lang.Integer> |
selectOne()
Create a new detached JPQLQuery instance with the projection one
|
static JPQLQuery<java.lang.Integer> |
selectZero()
Create a new detached JPQLQuery instance with the projection zero
|
static <U extends BeanPath<? extends T>,T> |
treat(BeanPath<? extends T> path,
java.lang.Class<U> subtype)
Create a JPA 2.1 treated path.
|
static StringExpression |
type(EntityPath<?> path)
Create a type(path) expression
|
public static <T> JPQLQuery<T> select(Expression<T> expr)
T
- expr
- projectionpublic static JPQLQuery<Tuple> select(Expression<?>... exprs)
exprs
- projectionpublic static <T> JPQLQuery<T> selectDistinct(Expression<T> expr)
T
- expr
- projectionpublic static JPQLQuery<Tuple> selectDistinct(Expression<?>... exprs)
exprs
- projectionpublic static JPQLQuery<java.lang.Integer> selectZero()
public static JPQLQuery<java.lang.Integer> selectOne()
public static <T> JPQLQuery<T> selectFrom(EntityPath<T> expr)
T
- expr
- projection and sourcepublic static <U extends BeanPath<? extends T>,T> U treat(BeanPath<? extends T> path, java.lang.Class<U> subtype)
U
- the subtype classT
- the expression typepath
- The path to apply the treat operation onsubtype
- subtype classpublic static <A extends java.lang.Comparable<? super A>> ComparableExpression<A> avg(CollectionExpression<?,A> col)
col
- collectionpublic static <A extends java.lang.Comparable<? super A>> ComparableExpression<A> max(CollectionExpression<?,A> left)
left
- collectionpublic static <A extends java.lang.Comparable<? super A>> ComparableExpression<A> min(CollectionExpression<?,A> left)
left
- collectionpublic static StringExpression type(EntityPath<?> path)
path
- entityCopyright © 2007–2021 Querydsl. All rights reserved.