public class AggregateExpression
extends java.lang.Object
Encapsulates an OData aggregate expression item.
Constructor and Description |
---|
AggregateExpression() |
Modifier and Type | Method and Description |
---|---|
static AggregateExpression |
count(java.lang.String alias)
Creates a $count aggregate expression item.
|
static AggregateExpression |
create(DataValue value,
AggregateMethod method,
java.lang.String alias)
Creates an aggregate expression item.
|
static AggregateExpression |
createWithNavigationPath(DataValue value,
AggregateMethod method,
java.lang.String alias,
PropertyPath navigationPath)
Creates an aggregate expression item.
|
AggregateExpression |
from(PropertyPath propertyPath,
AggregateMethod method)
Adds a 'from' clause to the aggregate expression.
|
AggregateFromList |
getAggregateFromList()
Return the items in the "from" clause of the aggregate item.
|
java.lang.String |
getAlias()
Return (nullable) The alias of the aggregate transformation item.
|
AggregateMethod |
getMethod()
Return (nullable) The method of the aggregate transformation item.
|
PropertyPath |
getNavigationPath()
Return (nullable) The navigation path to be applied for the aggregate expression.
|
DataValue |
getValue()
Return (nullable) The value of the aggregate transformation item.
|
boolean |
isCount()
Return true if the aggregate transformation item represents a $count item.
|
public static AggregateExpression count(java.lang.String alias)
Creates a $count aggregate expression item.
alias
- The alias for the aggregate item.public static AggregateExpression create(DataValue value, AggregateMethod method, java.lang.String alias)
Creates an aggregate expression item.
value
- (nullable) The value to be aggregated.method
- (nullable) The aggregate method to be used for aggregating.alias
- (nullable) The alias for the returned result property.public static AggregateExpression createWithNavigationPath(DataValue value, AggregateMethod method, java.lang.String alias, PropertyPath navigationPath)
Creates an aggregate expression item.
value
- (nullable) The value to be aggregated.method
- (nullable) The aggregate method to be used for aggregating.alias
- (nullable) The alias for the returned result property.navigationPath
- (nullable) The path of the related entities to apply the aggregate transformation on.public AggregateExpression from(PropertyPath propertyPath, AggregateMethod method)
Adds a 'from' clause to the aggregate expression.
propertyPath
- The property path for the 'from' clause.method
- (nullable) The aggregate method for the 'from' clause.public AggregateFromList getAggregateFromList()
Return the items in the "from" clause of the aggregate item.
public java.lang.String getAlias()
Return (nullable) The alias of the aggregate transformation item.
public AggregateMethod getMethod()
Return (nullable) The method of the aggregate transformation item.
public PropertyPath getNavigationPath()
Return (nullable) The navigation path to be applied for the aggregate expression. All the paths will be evaluated relative to this path.
public DataValue getValue()
Return (nullable) The value of the aggregate transformation item.
public boolean isCount()
Return true if the aggregate transformation item represents a $count item.