Package org.apache.cayenne.exp.property
Class NumericProperty<E extends Number>
java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<E>
org.apache.cayenne.exp.property.NumericProperty<E>
- All Implemented Interfaces:
- ComparableProperty<E>,- Property<E>
- Direct Known Subclasses:
- NumericIdProperty
public class NumericProperty<E extends Number>
extends BaseProperty<E>
implements ComparableProperty<E>
Property that represents attributes mapped on numeric types
 
 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.
- Since:
- 4.2
- See Also:
- 
Field SummaryFields inherited from class org.apache.cayenne.exp.property.BasePropertyexpressionSupplier, path, type
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedNumericProperty(CayennePath path, Expression expression, Class<E> type) Constructs a new property with the given name and expression
- 
Method SummaryModifier and TypeMethodDescriptionabs()add(NumericProperty<?> value) Creates alias with different name for this propertyavg()div(NumericProperty<?> value) This operator allows to access properties of the enclosing query from the subquery.max()min()mod(NumericProperty<?> number) mul(NumericProperty<?> value) neg()sqrt()sub(NumericProperty<?> value) sum()Methods inherited from class org.apache.cayenne.exp.property.BasePropertyaggregate, asc, ascInsensitive, ascInsensitives, ascs, count, countDistinct, desc, descInsensitive, descInsensitives, descs, eq, eq, equals, function, function, getAlias, getExpression, getFrom, getFromAll, getName, getPath, getType, hashCode, in, in, in, isFalse, isNotNull, isNull, isTrue, ne, ne, nin, nin, nin, operator, operator, setIn, setInAllMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
- 
Constructor Details- 
NumericPropertyConstructs a new property with the given name and expression- Parameters:
- path- of the property (will be used as alias for the expression)
- expression- expression for property
- type- of the property
- See Also:
 
 
- 
- 
Method Details- 
avg
- 
sum
- 
max- Specified by:
- maxin interface- ComparableProperty<E extends Number>
- See Also:
 
- 
min- Specified by:
- minin interface- ComparableProperty<E extends Number>
- See Also:
 
- 
mod
- 
mod
- 
abs- Returns:
- new property that represents abs() function call with current property as argument
- See Also:
 
- 
sqrt- Returns:
- new property that represents sqrt() function call with current property as argument
- See Also:
 
- 
add- Returns:
- new property that represents '+' operator with current property as argument
 
- 
add- Returns:
- new property that represents '+' operator with current property as argument
 
- 
sub- Returns:
- new property that represents '-' operator with current property as argument
 
- 
sub- Returns:
- new property that represents '-' operator with current property as argument
 
- 
div- Returns:
- new property that represents '/' operator with current property as argument
 
- 
div- Returns:
- new property that represents '/' operator with current property as argument
 
- 
mul- Returns:
- new property that represents '*' operator with current property as argument
 
- 
mul- Returns:
- new property that represents '*' operator with current property as argument
 
- 
neg- Returns:
- new property that represents negative value of current property
 
- 
aliasCreates alias with different name for this property- Overrides:
- aliasin class- BaseProperty<E extends Number>
 
- 
enclosingDescription copied from class:BasePropertyThis operator allows to access properties of the enclosing query from the subquery. It allows multiple nesting levels to access a corresponding query in case of multiple levels of subqueries. Example:ObjectSelect.query(Artist.class) .where(ExpressionFactory.notExists(ObjectSelect.query(Painting.class) .where(Painting.TO_ARTIST.eq(Artist.ARTIST_ID_PK_PROPERTY.enclosing()))))- Overrides:
- enclosingin class- BaseProperty<E extends Number>
- Returns:
- property that will be translated relative to parent query
 
 
-