Class AggregateExpressionImpl
java.lang.Object
org.apache.olingo.server.core.uri.queryoption.apply.AggregateExpressionImpl
- All Implemented Interfaces:
AggregateExpression,Expression,VisitableExpression
Represents an aggregate expression.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.olingo.server.api.uri.queryoption.apply.AggregateExpression
AggregateExpression.StandardMethod -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ExpressionVisitor<T> visitor) MethodVisitableExpression.accept(ExpressionVisitor)is called when traversing the expression tree.voidaddDynamicProperty(String name) Adds the dynamic property for aggregation expression.addFrom(AggregateExpression from) getAlias()Gets the name of the aggregate if an alias name has been set.Gets the name of the custom aggregation method if used.Gets the dynamic properties for aggregation expression.Gets the common expression to be aggregated.getFrom()Gets the aggregate expressions forfrom.Gets the inline aggregation expression to be applied to the target of the path if used.getPath()Gets the path prefix and the path segment.Gets the standard aggregation method if used.setCustomMethod(FullQualifiedName customMethod) setExpression(Expression expression) setInlineAggregateExpression(AggregateExpression aggregateExpression) setStandardMethod(AggregateExpression.StandardMethod standardMethod)
-
Constructor Details
-
AggregateExpressionImpl
public AggregateExpressionImpl()
-
-
Method Details
-
getPath
Description copied from interface:AggregateExpressionGets the path prefix and the path segment.- Specified by:
getPathin interfaceAggregateExpression- Returns:
- a (potentially empty) list of path segments (and never
null)
-
setPath
-
getExpression
Description copied from interface:AggregateExpressionGets the common expression to be aggregated.- Specified by:
getExpressionin interfaceAggregateExpression- Returns:
- an
Expressionthat could benull
-
setExpression
-
getStandardMethod
Description copied from interface:AggregateExpressionGets the standard aggregation method if used.- Specified by:
getStandardMethodin interfaceAggregateExpression- Returns:
- a
AggregateExpression.StandardMethodornull - See Also:
-
setStandardMethod
-
getCustomMethod
Description copied from interface:AggregateExpressionGets the name of the custom aggregation method if used.- Specified by:
getCustomMethodin interfaceAggregateExpression- Returns:
- a
FullQualifiedNameornull - See Also:
-
setCustomMethod
-
getInlineAggregateExpression
Description copied from interface:AggregateExpressionGets the inline aggregation expression to be applied to the target of the path if used.- Specified by:
getInlineAggregateExpressionin interfaceAggregateExpression- Returns:
- an aggregation expression or
null - See Also:
-
setInlineAggregateExpression
public AggregateExpressionImpl setInlineAggregateExpression(AggregateExpression aggregateExpression) -
getFrom
Description copied from interface:AggregateExpressionGets the aggregate expressions forfrom.- Specified by:
getFromin interfaceAggregateExpression- Returns:
- a (potentially empty) list of aggregate expressions (but never
null)
-
addFrom
-
getAlias
Description copied from interface:AggregateExpressionGets the name of the aggregate if an alias name has been set.- Specified by:
getAliasin interfaceAggregateExpression- Returns:
- an identifier String or
null
-
setAlias
-
accept
public <T> T accept(ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException Description copied from interface:VisitableExpressionMethodVisitableExpression.accept(ExpressionVisitor)is called when traversing the expression tree. This method is invoked on each expression used as node in an expression tree. The implementations should behave as follows:- Call accept on all sub nodes and store the returned Objects which are of the generic type T
- Call the appropriate method on the
ExpressionVisitorinstance and provide the stored return objects to that instance- Return the object which should be passed to the processing algorithm of the parent expression node
- Specified by:
acceptin interfaceVisitableExpression- Parameters:
visitor- Visitor object (implementingExpressionVisitor) whose methods are called during traversing a expression node of the expression tree.- Returns:
- Object of type T which should be passed to the processing algorithm of the parent expression node
- Throws:
ExpressionVisitException- Exception occurred in the OData library while traversing the treeODataApplicationException- Exception thrown by the application who implemented the visitor
-
getDynamicProperties
Description copied from interface:AggregateExpressionGets the dynamic properties for aggregation expression.- Specified by:
getDynamicPropertiesin interfaceAggregateExpression- Returns:
- the set of properties
-
addDynamicProperty
Description copied from interface:AggregateExpressionAdds the dynamic property for aggregation expression.- Specified by:
addDynamicPropertyin interfaceAggregateExpression- Parameters:
name- an identifier
-