Interface NumericExpression<N extends Number & Comparable<N>>
- Type Parameters:
N- the type of the expression
- All Superinterfaces:
ComparableExpression<N>, Expression<N>, Selection<N>, TupleElement<N>
public interface NumericExpression<N extends Number & Comparable<N>>
extends ComparableExpression<N>
Type for number query expressions.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionabs()Create an expression that returns the absolute value of this expression.avg()Create an aggregate expression applying the avg operation.ceiling()Create an expression that returns the ceiling of this expression, that is, the smallest integer greater than or equal to this expression.coalesce(Expression<? extends N> y) Create an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.Create an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.dividedBy(Expression<? extends N> y) Create an expression that returns the quotient of this expression divided by the argument.Create an expression that returns the quotient of this expression divided by the argument.dividedInto(N y) Create an expression that returns the quotient of this expression dividing the argument.exp()Create an expression that returns the exponential of this expression, that is, Euler's number e raised to the power of its argument.floor()Create an expression that returns the floor of this expression, that is, the largest integer smaller than or equal to this expression.ge(Expression<? extends Number> y) Create a predicate for testing whether this expression is greater than or equal to the first argument.Create a predicate for testing whether this expression is greater than or equal to the first argument.gt(Expression<? extends Number> y) Create a predicate for testing whether this expression is greater than the first argument.Create a predicate for testing whether this expression is greater than the first argument.le(Expression<? extends Number> y) Create a predicate for testing whether this expression is less than or equal to the first argument.Create a predicate for testing whether this expression is less than or equal to the first argument.ln()Create an expression that returns the natural logarithm of this expression.lt(Expression<? extends Number> y) Create a predicate for testing whether this expression is less than the first argument.Create a predicate for testing whether this expression is less than the first argument.max()Create an aggregate expression applying the numerical max operation.min()Create an aggregate expression applying the numerical min operation.minus(Expression<? extends N> y) Create an expression that returns the difference between this expression subtracted by the argument.Create an expression that returns the difference between this expression subtracted by the argument.negated()Create an expression that returns the arithmetic negation of this expression.nullif(Expression<? extends N> y) Create an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.Create an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.plus(Expression<? extends N> y) Create an expression that returns the sum of this expression and its argument.Create an expression that returns the sum of this expression and its argument.power(Expression<? extends Number> y) Create an expression that returns this expression raised to the power of its first argument.Create an expression that returns this number expression raised to the power of its first argument.Create an expression that returns this number expression rounded to the number of decimal places given by the first argument.sign()Create an expression that returns the sign of this expression, that is,1if this expression is positive,-1if this expression is negative, or0if this expression is exactly zero.sqrt()Create an expression that returns the square root of this expression.subtractedFrom(N y) Create an expression that returns the difference between this expression subtracted from the argument.sum()Create an aggregate expression applying the sum operation.Create an aggregate expression applying the sum operation, returning a Double result.Create an aggregate expression applying the sum operation, returning a Long result.times(Expression<? extends N> y) Create an expression that returns the product of this expression multiplied by the argument.Create an expression that returns the product of this expression multiplied by the argument.Typecast.Typecast.toDouble()Typecast.toFloat()Typecast.Typecast.toLong()Typecast.Methods inherited from interface ComparableExpression
asc, asc, between, between, desc, desc, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualToMethods inherited from interface Expression
as, cast, count, countDistinct, equalTo, equalTo, in, in, in, in, in, isMember, isNotMember, isNotNull, isNull, notEqualTo, notEqualTo, selectCaseMethods inherited from interface Selection
alias, getCompoundSelectionItems, isCompoundSelectionMethods inherited from interface TupleElement
getAlias, getJavaType
-
Method Details
-
gt
Create a predicate for testing whether this expression is greater than the first argument.- Parameters:
y- expression- Returns:
- greater-than predicate
- See Also:
-
gt
-
ge
Create a predicate for testing whether this expression is greater than or equal to the first argument.- Parameters:
y- expression- Returns:
- greater-than-or-equal predicate
- See Also:
-
ge
-
lt
Create a predicate for testing whether this expression is less than the first argument.- Parameters:
y- expression- Returns:
- less-than predicate
- See Also:
-
lt
-
le
Create a predicate for testing whether this expression is less than or equal to the first argument.- Parameters:
y- expression- Returns:
- less-than-or-equal predicate
- See Also:
-
le
-
sign
Create an expression that returns the sign of this expression, that is,1if this expression is positive,-1if this expression is negative, or0if this expression is exactly zero.- Returns:
- sign
- See Also:
-
negated
Create an expression that returns the arithmetic negation of this expression.- Returns:
- arithmetic negation
- See Also:
-
abs
Create an expression that returns the absolute value of this expression.- Returns:
- absolute value
- See Also:
-
ceiling
Create an expression that returns the ceiling of this expression, that is, the smallest integer greater than or equal to this expression.- Returns:
- ceiling
- See Also:
-
floor
Create an expression that returns the floor of this expression, that is, the largest integer smaller than or equal to this expression.- Returns:
- floor
- See Also:
-
plus
Create an expression that returns the sum of this expression and its argument.- Parameters:
y- expression- Returns:
- sum
- See Also:
-
plus
Create an expression that returns the sum of this expression and its argument.- Parameters:
y- value- Returns:
- sum
- See Also:
-
times
Create an expression that returns the product of this expression multiplied by the argument.- Parameters:
y- expression- Returns:
- product
- See Also:
-
times
Create an expression that returns the product of this expression multiplied by the argument.- Parameters:
y- value- Returns:
- product
- See Also:
-
minus
Create an expression that returns the difference between this expression subtracted by the argument.- Parameters:
y- expression- Returns:
- difference
- See Also:
-
minus
Create an expression that returns the difference between this expression subtracted by the argument.- Parameters:
y- value- Returns:
- difference
- See Also:
-
dividedBy
Create an expression that returns the quotient of this expression divided by the argument.- Parameters:
y- expression- Returns:
- quotient
- See Also:
-
dividedBy
Create an expression that returns the quotient of this expression divided by the argument.- Parameters:
y- value- Returns:
- quotient
- See Also:
-
subtractedFrom
Create an expression that returns the difference between this expression subtracted from the argument.- Parameters:
y- value- Returns:
- difference
-
dividedInto
Create an expression that returns the quotient of this expression dividing the argument.- Parameters:
y- value- Returns:
- quotient
-
sqrt
Create an expression that returns the square root of this expression.- Returns:
- square root
- See Also:
-
exp
Create an expression that returns the exponential of this expression, that is, Euler's number e raised to the power of its argument.- Returns:
- exponential
- See Also:
-
ln
Create an expression that returns the natural logarithm of this expression.- Returns:
- natural logarithm
- See Also:
-
power
Create an expression that returns this expression raised to the power of its first argument.- Parameters:
y- exponent- Returns:
- the base raised to the power of the exponent
- See Also:
-
power
Create an expression that returns this number expression raised to the power of its first argument.- Parameters:
y- exponent- Returns:
- the base raised to the power of the exponent
- See Also:
-
round
Create an expression that returns this number expression rounded to the number of decimal places given by the first argument.- Parameters:
n- number of decimal places- Returns:
- the rounded value
- See Also:
-
avg
Create an aggregate expression applying the avg operation.- Returns:
- avg expression
- See Also:
-
sum
Create an aggregate expression applying the sum operation.- Returns:
- sum expression
- See Also:
-
sumAsLong
Create an aggregate expression applying the sum operation, returning a Long result.- Returns:
- sum expression
- See Also:
-
sumAsDouble
Create an aggregate expression applying the sum operation, returning a Double result.- Returns:
- sum expression
- See Also:
-
max
Create an aggregate expression applying the numerical max operation.- Specified by:
maxin interfaceComparableExpression<N extends Number & Comparable<N>>- Returns:
- max expression
- See Also:
-
min
Create an aggregate expression applying the numerical min operation.- Specified by:
minin interfaceComparableExpression<N extends Number & Comparable<N>>- Returns:
- min expression
- See Also:
-
toLong
-
toInteger
-
toFloat
-
toDouble
-
toBigDecimal
Typecast.- Returns:
- Expression<BigDecimal>
- See Also:
-
toBigInteger
Typecast.- Returns:
- Expression<BigInteger>
- See Also:
-
coalesce
Description copied from interface:ExpressionCreate an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.- Specified by:
coalescein interfaceComparableExpression<N extends Number & Comparable<N>>- Specified by:
coalescein interfaceExpression<N extends Number & Comparable<N>>- Parameters:
y- value- Returns:
- coalesce expression
-
coalesce
Description copied from interface:ExpressionCreate an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.- Specified by:
coalescein interfaceComparableExpression<N extends Number & Comparable<N>>- Specified by:
coalescein interfaceExpression<N extends Number & Comparable<N>>- Parameters:
y- expression- Returns:
- coalesce expression
-
nullif
Description copied from interface:ExpressionCreate an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.- Specified by:
nullifin interfaceComparableExpression<N extends Number & Comparable<N>>- Specified by:
nullifin interfaceExpression<N extends Number & Comparable<N>>- Parameters:
y- value- Returns:
- nullif expression
-
nullif
Description copied from interface:ExpressionCreate an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.- Specified by:
nullifin interfaceComparableExpression<N extends Number & Comparable<N>>- Specified by:
nullifin interfaceExpression<N extends Number & Comparable<N>>- Parameters:
y- expression- Returns:
- nullif expression
-