Class NumberExpression<T extends Number & Comparable<?>>
- Type Parameters:
T- expression type
- All Implemented Interfaces:
Expression<T>,Serializable
- Direct Known Subclasses:
NumberOperation,NumberPath,NumberTemplate
NumberExpression represents a numeric expression- Author:
- tiwe
- See Also:
-
Field Summary
Fields inherited from class com.querydsl.core.types.dsl.DslExpression
hashCode, mixin -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs()Create aabs(this)expression<N extends Number & Comparable<?>>
NumberExpression<T>add(Expression<N> right) Create athis + rightexpression<N extends Number & Comparable<N>>
NumberExpression<T>add(N right) Create athis + rightexpressionCreate an alias for the expressionCreate an alias for the expressionavg()Create aavg(this)expressionfinal <A extends Number & Comparable<?>>
BooleanExpressionbetween(@Nullable Expression<A> from, @Nullable Expression<A> to) Create athis between from and toexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressionbetween(A from, A to) Create athis between from and toexpressionCreate acast(this as byte)expression<A extends Number & Comparable<? super A>>
NumberExpression<A>ceil()Create aceil(this)expressioncoalesce(Expression<?>... exprs) Create acoalesce(this, exprs...)expressioncoalesce(Expression<T> expr) Create acoalesce(this, expr)expressionCreate acoalesce(this, arg)expressionCreate acoalesce(this, args...)expression<N extends Number & Comparable<?>>
NumberExpression<T>divide(Expression<N> right) Create athis / rightexpression<N extends Number & Comparable<?>>
NumberExpression<T>divide(N right) Create athis / rightexpressionCreate acast(this as double)expressionCreate acast(this as double)expressionfloor()Create afloor(this)expressionfinal <A extends Number & Comparable<?>>
BooleanExpressiongoe(A right) Create athis >= rightexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressiongoe(Expression<A> right) Create athis >= rightexpressiongoeAll(CollectionExpression<?, ? super T> right) Create athis >= all rightexpressiongoeAny(CollectionExpression<?, ? super T> right) Create athis >= any rightexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressiongt(A right) Create athis > rightexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressiongt(Expression<A> right) Create athis > rightexpressiongtAll(CollectionExpression<?, ? super T> right) Create athis > all rightexpressiongtAll(SubQueryExpression<? extends T> right) Create athis > all rightexpressiongtAny(CollectionExpression<?, ? super T> right) Create athis > any rightexpressiongtAny(SubQueryExpression<? extends T> right) Create athis > any rightexpressionCreate athis in rightexpressionintValue()Create athis.intValue()expressionlike(Expression<String> str) Create athis like strexpressionCreate athis like strexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressionloe(A right) Create athis <= rightexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressionloe(Expression<A> right) Create athis <= rightexpressionloeAll(CollectionExpression<?, ? super T> right) Create athis <= all rightexpressionloeAny(CollectionExpression<?, ? super T> right) Create athis <= any rightexpressionCreate athis.longValue()expressionfinal <A extends Number & Comparable<?>>
BooleanExpressionlt(A right) Create athis < rightexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressionlt(Expression<A> right) Create athis < rightexpressionltAll(CollectionExpression<?, ? super T> right) Create athis < all rightexpressionltAny(CollectionExpression<?, ? super T> right) Create athis < any rightexpressionmax()Create amax(this)expressionstatic <A extends Number & Comparable<?>>
NumberExpression<A>max(Expression<A> left, Expression<A> right) Create amax(left, right)expressionmin()Create amin(this)expressionstatic <A extends Number & Comparable<?>>
NumberExpression<A>min(Expression<A> left, Expression<A> right) Create amin(left, right)expressionmod(Expression<T> num) Create amod(this, num)expressionCreate amod(this, num)expression<N extends Number & Comparable<?>>
NumberExpression<T>multiply(Expression<N> right) Create athis * rightexpression<N extends Number & Comparable<N>>
NumberExpression<T>multiply(N right) Create athis * rightexpressionnegate()Create athis * -1expressionfinal <A extends Number & Comparable<?>>
BooleanExpressionnotBetween(A from, A to) Create athis not between from and toexpressionfinal <A extends Number & Comparable<?>>
BooleanExpressionnotBetween(Expression<A> from, Expression<A> to) Create athis not between from and toexpressionCreate athis not in rightexpressionnullif(Expression<T> other) Create anullif(this, other)expressionCreate anullif(this, other)expressionstatic NumberExpression<Double>random()Create arandom()expressionround()Create around(this)expressionCreate athis.shortValue()expressionsqrt()Create asqrt(this)expressionCreate a cast to String expression<N extends Number & Comparable<?>>
NumberExpression<T>subtract(Expression<N> right) Create athis - rightexpression<N extends Number & Comparable<?>>
NumberExpression<T>subtract(N right) Create athis - rightexpressionsum()Create asum(this)expressionMethods inherited from class com.querydsl.core.types.dsl.ComparableExpressionBase
asc, descMethods inherited from class com.querydsl.core.types.dsl.SimpleExpression
count, countDistinct, eq, eq, eqAll, eqAll, eqAny, eqAny, in, in, in, in, isNotNull, isNull, ne, ne, neAll, neAny, notIn, notIn, notIn, notIn, when, whenMethods inherited from class com.querydsl.core.types.dsl.DslExpression
equals, getType, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.querydsl.core.types.Expression
accept
-
Constructor Details
-
NumberExpression
-
-
Method Details
-
max
public static <A extends Number & Comparable<?>> NumberExpression<A> max(Expression<A> left, Expression<A> right) Create amax(left, right)expressionReturn the greater of the given values
- Returns:
- max(left, right)
-
min
public static <A extends Number & Comparable<?>> NumberExpression<A> min(Expression<A> left, Expression<A> right) Create amin(left, right)expressionReturns the smaller of the given values
- Returns:
- min(left, right)
-
random
Create arandom()expressionReturns the random number
- Returns:
- random()
-
as
Description copied from class:SimpleExpressionCreate an alias for the expression- Overrides:
asin classSimpleExpression<T extends Number & Comparable<?>>- Returns:
- alias expression
-
as
Description copied from class:SimpleExpressionCreate an alias for the expression- Overrides:
asin classSimpleExpression<T extends Number & Comparable<?>>- Returns:
- alias expression
-
stringValue
Create a cast to String expression- Returns:
- string representation
- See Also:
-
abs
Create aabs(this)expressionReturns the absolute value of this expression
- Returns:
- abs(this)
-
add
Create athis + rightexpressionReturns the sum of this and right
- Parameters:
right- rhs of expression- Returns:
- this + right
-
add
Create athis + rightexpressionGet the sum of this and right
- Parameters:
right- rhs of expression- Returns:
- this + right
-
avg
Create aavg(this)expressionGet the average value of this expression (aggregation)
- Returns:
- avg(this)
-
byteValue
Create acast(this as byte)expressionGet the byte expression of this numeric expression
- Returns:
- this.byteValue()
- See Also:
-
castToNum
-
ceil
Create aceil(this)expressionReturns the smallest (closest to negative infinity)
doublevalue that is greater than or equal to the argument and is equal to a mathematical integer- Returns:
- ceil(this)
- See Also:
-
divide
Create athis / rightexpressionGet the result of the operation this / right
- Parameters:
right-- Returns:
- this / right
-
divide
Create athis / rightexpressionGet the result of the operation this / right
- Parameters:
right-- Returns:
- this / right
-
doubleValue
Create acast(this as double)expressionGet the double expression of this numeric expression
- Returns:
- this.doubleValue()
- See Also:
-
floatValue
Create acast(this as double)expressionGet the float expression of this numeric expression
- Returns:
- this.floatValue()
- See Also:
-
floor
Create afloor(this)expressionReturns the largest (closest to positive infinity)
doublevalue that is less than or equal to the argument and is equal to a mathematical integer.- Returns:
- floor(this)
- See Also:
-
goe
Create athis >= rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this >= right- See Also:
-
goe
Create athis >= rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this >= right- See Also:
-
goeAll
Create athis >= all rightexpression- Parameters:
right-- Returns:
- this >= all right
-
goeAny
Create athis >= any rightexpression- Parameters:
right-- Returns:
- this >= any right
-
gt
Create athis > rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this > right- See Also:
-
gt
Create athis > rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this > right- See Also:
-
gtAll
Create athis > all rightexpression- Parameters:
right-- Returns:
- this > all right
-
gtAny
Create athis > any rightexpression- Parameters:
right-- Returns:
- this > any right
-
gtAll
Create athis > all rightexpression- Parameters:
right-- Returns:
- this > all right
-
gtAny
Create athis > any rightexpression- Parameters:
right-- Returns:
- this > any right
-
between
public final <A extends Number & Comparable<?>> BooleanExpression between(@Nullable A from, @Nullable A to) Create athis between from and toexpressionIs equivalent to
from <= this <= to- Type Parameters:
A-- Parameters:
from- inclusive start of rangeto- inclusive end of range- Returns:
- this between from and to
-
between
public final <A extends Number & Comparable<?>> BooleanExpression between(@Nullable @Nullable Expression<A> from, @Nullable @Nullable Expression<A> to) Create athis between from and toexpressionIs equivalent to
from <= this <= to- Type Parameters:
A-- Parameters:
from- inclusive start of rangeto- inclusive end of range- Returns:
- this between from and to
-
notBetween
Create athis not between from and toexpressionIs equivalent to
this < from || this > to- Parameters:
from- inclusive start of rangeto- inclusive end of range- Returns:
- this not between from and to
-
notBetween
public final <A extends Number & Comparable<?>> BooleanExpression notBetween(Expression<A> from, Expression<A> to) Create athis not between from and toexpressionIs equivalent to
this < from || this > to- Parameters:
from- inclusive start of rangeto- inclusive end of range- Returns:
- this not between from and to
-
intValue
Create athis.intValue()expressionGet the int expression of this numeric expression
- Returns:
- this.intValue()
- See Also:
-
like
Create athis like strexpression- Parameters:
str- rhs- Returns:
- this like str
-
like
Create athis like strexpression- Parameters:
str-- Returns:
- this like str
-
loe
Create athis <= rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this <= right- See Also:
-
loe
Create athis <= rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this <= right- See Also:
-
loeAll
Create athis <= all rightexpression- Parameters:
right- rhs- Returns:
- this <= all right
-
loeAny
Create athis <= any rightexpression- Parameters:
right- rhs- Returns:
- this <= any right
-
longValue
Create athis.longValue()expressionGet the long expression of this numeric expression
- Returns:
- this.longValue()
- See Also:
-
lt
Create athis < rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this < right- See Also:
-
lt
Create athis < rightexpression- Type Parameters:
A-- Parameters:
right- rhs of the comparison- Returns:
this < right- See Also:
-
ltAll
Create athis < all rightexpression- Parameters:
right- rhs- Returns:
- this < all right
-
ltAny
Create athis < any rightexpression- Parameters:
right- rhs- Returns:
- this < any right
-
max
Create amax(this)expressionGet the maximum value of this expression (aggregation)
- Overrides:
maxin classComparableExpressionBase<T extends Number & Comparable<?>>- Returns:
- max(this)
-
min
Create amin(this)expressionGet the minimum value of this expression (aggregation)
- Overrides:
minin classComparableExpressionBase<T extends Number & Comparable<?>>- Returns:
- min(this)
-
mod
Create amod(this, num)expression- Parameters:
num-- Returns:
- mod(this, num)
-
mod
Create amod(this, num)expression- Parameters:
num-- Returns:
- mod(this, num)
-
multiply
Create athis * rightexpressionGet the result of the operation this * right
- Parameters:
right-- Returns:
- this * right
-
multiply
Create athis * rightexpressionGet the result of the operation this * right
- Parameters:
right-- Returns:
- this * right
-
negate
Create athis * -1expressionGet the negation of this expression
- Returns:
- this * -1
-
round
Create around(this)expressionReturns the closest
intto this.- Returns:
- round(this)
- See Also:
-
shortValue
Create athis.shortValue()expressionGet the short expression of this numeric expression
- Returns:
- this.shortValue()
- See Also:
-
sqrt
Create asqrt(this)expressionGet the square root of this numeric expressions
- Returns:
- sqrt(this)
-
subtract
Create athis - rightexpressionGet the difference of this and right
- Parameters:
right-- Returns:
- this - right
-
subtract
Create athis - rightexpressionGet the difference of this and right
- Parameters:
right-- Returns:
- this - right
-
sum
Create asum(this)expressionGet the sum of this expression (aggregation)
- Returns:
- sum(this)
-
in
Description copied from class:SimpleExpressionCreate athis in rightexpression- Overrides:
inin classSimpleExpression<T extends Number & Comparable<?>>- Parameters:
numbers- rhs of the comparison- Returns:
- this in right
-
notIn
Description copied from class:SimpleExpressionCreate athis not in rightexpression- Overrides:
notInin classSimpleExpression<T extends Number & Comparable<?>>- Parameters:
numbers- rhs of the comparison- Returns:
- this not in right
-
nullif
Create anullif(this, other)expression- Overrides:
nullifin classComparableExpressionBase<T extends Number & Comparable<?>>- Parameters:
other-- Returns:
- nullif(this, other)
-
nullif
Create anullif(this, other)expression- Overrides:
nullifin classComparableExpressionBase<T extends Number & Comparable<?>>- Parameters:
other-- Returns:
- nullif(this, other)
-
coalesce
Create acoalesce(this, expr)expression- Overrides:
coalescein classComparableExpressionBase<T extends Number & Comparable<?>>- Parameters:
expr- additional argument- Returns:
- coalesce
-
coalesce
Create acoalesce(this, exprs...)expression- Overrides:
coalescein classComparableExpressionBase<T extends Number & Comparable<?>>- Parameters:
exprs- additional arguments- Returns:
- coalesce
-
coalesce
Create acoalesce(this, arg)expression- Overrides:
coalescein classComparableExpressionBase<T extends Number & Comparable<?>>- Parameters:
arg- additional argument- Returns:
- coalesce
-
coalesce
Create acoalesce(this, args...)expression- Overrides:
coalescein classComparableExpressionBase<T extends Number & Comparable<?>>- Parameters:
args- additional arguments- Returns:
- coalesce
-