T
- Projection result typepublic interface QueryProjection<T> extends TypedExpression<T>
Expression
to obtain typed query results.Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException
Modifier and Type | Method and Description |
---|---|
static <T> QueryProjection<T> |
bean(Class<? extends T> beanClass,
Path<?>... selection)
Create a
QueryProjection using given bean class. |
static <T> QueryProjection<T> |
constant(T value)
Create a
QueryProjection for a constant value. |
static QueryProjection<Long> |
countAll()
Create a query projection to count all the query results.
|
static <T> QueryProjection<T> |
path(Path<T> path)
Create a
QueryProjection for a Path expression. |
static <P extends Property> |
propertySet(Iterable<P> properties)
Create a
PropertyBox type query projection using given properties as property set. |
static QueryProjection<PropertyBox> |
propertySet(Property<?>... properties)
Create a
PropertyBox type query projection using given properties as property set. |
getTemporalType, getType, isCollectionExpression, isConverterExpression
validate
static <T> QueryProjection<T> constant(T value)
QueryProjection
for a constant value.T
- Expression typevalue
- Constant valuestatic <T> QueryProjection<T> path(Path<T> path)
QueryProjection
for a Path
expression.T
- Path typepath
- The Path
expression (not null)static QueryProjection<PropertyBox> propertySet(Property<?>... properties)
PropertyBox
type query projection using given properties
as property set.properties
- The projection property set (not null)properties
as property setstatic <P extends Property> QueryProjection<PropertyBox> propertySet(Iterable<P> properties)
PropertyBox
type query projection using given properties
as property set.P
- Property typeproperties
- The projection property set (not null)properties
as property setstatic <T> QueryProjection<T> bean(Class<? extends T> beanClass, Path<?>... selection)
QueryProjection
using given bean class.T
- Bean typebeanClass
- The bean class (not null)selection
- Optional selection paths. If not provided, all valid bean property paths will be used.static QueryProjection<Long> countAll()
Long
typeCopyright © 2019 The Holon Platform. All rights reserved.