public class NumericProperty<E extends Number> extends BaseProperty<E> implements ComparableProperty<E>
Numeric type is an any type inherited from Number
.
Provides basic math functions like mod(Number)
, abs()
and sqrt()
.
It is also implements ComparableProperty
interface.
org.apache.cayenne.exp.property
expressionSupplier, name, type
Modifier | Constructor and Description |
---|---|
protected |
NumericProperty(String name,
Expression expression,
Class<E> type)
Constructs a new property with the given name and expression
|
Modifier and Type | Method and Description |
---|---|
NumericProperty<E> |
abs() |
NumericProperty<E> |
add(E value) |
NumericProperty<E> |
add(NumericProperty<?> value) |
NumericProperty<E> |
alias(String alias)
Creates alias with different name for this property
|
NumericProperty<E> |
avg() |
NumericProperty<E> |
div(E value) |
NumericProperty<E> |
div(NumericProperty<?> value) |
NumericProperty<E> |
enclosing() |
NumericProperty<E> |
max() |
NumericProperty<E> |
min() |
NumericProperty<E> |
mod(Number number) |
NumericProperty<E> |
mod(NumericProperty<?> number) |
NumericProperty<E> |
mul(E value) |
NumericProperty<E> |
mul(NumericProperty<?> value) |
NumericProperty<E> |
neg() |
NumericProperty<E> |
sqrt() |
NumericProperty<E> |
sub(E value) |
NumericProperty<E> |
sub(NumericProperty<?> value) |
NumericProperty<E> |
sum() |
asc, ascInsensitive, ascInsensitives, ascs, count, countDistinct, desc, descInsensitive, descInsensitives, descs, eq, eq, equals, function, function, getAlias, getExpression, getFrom, getFromAll, getName, getType, hashCode, in, in, in, isFalse, isNotNull, isNull, isTrue, ne, ne, nin, nin, nin, path, setIn, setInAll
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
between, between, gt, gt, gte, gte, lt, lt, lte, lte
getAlias, getExpression, getName, getType
protected NumericProperty(String name, Expression expression, Class<E> type)
name
- of the property (will be used as alias for the expression)expression
- expression for propertytype
- of the propertyPropertyFactory.createNumeric(String, Expression, Class)
public NumericProperty<E> avg()
public NumericProperty<E> sum()
public NumericProperty<E> max()
max
in interface ComparableProperty<E extends Number>
FunctionExpressionFactory.maxExp(Expression)
public NumericProperty<E> min()
min
in interface ComparableProperty<E extends Number>
FunctionExpressionFactory.minExp(Expression)
public NumericProperty<E> mod(Number number)
public NumericProperty<E> mod(NumericProperty<?> number)
public NumericProperty<E> abs()
FunctionExpressionFactory.absExp(Expression)
public NumericProperty<E> sqrt()
FunctionExpressionFactory.sqrtExp(Expression)
public NumericProperty<E> add(E value)
public NumericProperty<E> add(NumericProperty<?> value)
public NumericProperty<E> sub(E value)
public NumericProperty<E> sub(NumericProperty<?> value)
public NumericProperty<E> div(E value)
public NumericProperty<E> div(NumericProperty<?> value)
public NumericProperty<E> mul(E value)
public NumericProperty<E> mul(NumericProperty<?> value)
public NumericProperty<E> neg()
public NumericProperty<E> alias(String alias)
alias
in class BaseProperty<E extends Number>
public NumericProperty<E> enclosing()
enclosing
in class BaseProperty<E extends Number>
Copyright © 2001–2020 Apache Cayenne. All rights reserved.