Class ExpressionBase
java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
- All Implemented Interfaces:
Expression
,Serializable
- Direct Known Subclasses:
AccessProjectionExpressionBase
,ArithmaticExpression
,ArrayExpression
,AvedevProjectionExpression
,AvgProjectionExpression
,BetweenExpression
,BitwiseOpExpression
,CaseSwitchExpression
,CaseWhenThenExpression
,CastExpression
,CoalesceExpression
,CompareListExpression
,ConcatExpression
,ConstantExpression
,CountEverProjectionExpression
,CountProjectionExpression
,CountStarProjectionExpression
,CrontabFrequencyExpression
,CrontabParameterExpression
,CrontabParameterSetExpression
,CrontabRangeExpression
,CurrentEvaluationContextExpression
,CurrentTimestampExpression
,DotExpression
,ExpressionPlaceholder
,FirstEverProjectionExpression
,GroupingExpression
,GroupingIdExpression
,InExpression
,InstanceOfExpression
,IStreamBuiltinExpression
,Junction
,LambdaExpression
,LastEverProjectionExpression
,LikeExpression
,MaxProjectionExpression
,MaxRowExpression
,MedianProjectionExpression
,MinProjectionExpression
,MinRowExpression
,NamedParameterExpression
,NewInstanceOperatorExpression
,NewOperatorExpression
,NotExpression
,OrderedObjectParamExpression
,PlugInProjectionExpression
,PreviousExpression
,PriorExpression
,PropertyExistsExpression
,PropertyValueExpression
,RegExpExpression
,RelationalOpExpression
,SingleRowMethodExpression
,StaticMethodExpression
,StddevProjectionExpression
,StreamWildcardExpression
,SubqueryExistsExpression
,SubqueryExpression
,SubqueryInExpression
,SubqueryQualifiedExpression
,SubstitutionParameterExpression
,SumProjectionExpression
,TableAccessExpression
,TimePeriodExpression
,TypeOfExpression
,WildcardExpression
Base expression.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(Expression expression) Adds a new child expression to the current expression.Returns the list of sub-expressions to the current expression.Returns the tree of object name, for use by tools to assign an identifier to an expression.protected static void
renderAggregation
(StringWriter writer, String name, boolean distinct, List<Expression> children) Render an aggregation function with distinct and parameter expressionsvoid
setChildren
(List<Expression> children) Sets the list of sub-expressions (child expressions) to the current expression node.void
setTreeObjectName
(String treeObjectName) Sets the tree of object name, for use by tools to assign an identifier to an expression.final void
toEPL
(StringWriter writer, ExpressionPrecedenceEnum parentPrecedence) Write expression considering precedence.abstract void
toPrecedenceFreeEPL
(StringWriter writer) Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.protected static void
toPrecedenceFreeEPL
(String functionName, List<Expression> children, StringWriter writer) Renders child expression of a function in a comma-separated list.static void
toPrecedenceFreeEPL
(List<Expression> children, StringWriter writer) Render expression listMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.espertech.esper.common.client.soda.Expression
getPrecedence
-
Constructor Details
-
ExpressionBase
public ExpressionBase()Ctor.
-
-
Method Details
-
getTreeObjectName
Description copied from interface:Expression
Returns the tree of object name, for use by tools to assign an identifier to an expression.- Specified by:
getTreeObjectName
in interfaceExpression
- Returns:
- tree object id
-
setTreeObjectName
Description copied from interface:Expression
Sets the tree of object name, for use by tools to assign an identifier to an expression.- Specified by:
setTreeObjectName
in interfaceExpression
- Parameters:
treeObjectName
- tree object id
-
getChildren
Returns the list of sub-expressions to the current expression.- Specified by:
getChildren
in interfaceExpression
- Returns:
- list of child expressions
-
addChild
Adds a new child expression to the current expression.- Parameters:
expression
- to add
-
setChildren
Description copied from interface:Expression
Sets the list of sub-expressions (child expressions) to the current expression node.- Specified by:
setChildren
in interfaceExpression
- Parameters:
children
- child expressions or empty list if there are no child expressions
-
toEPL
Description copied from interface:Expression
Write expression considering precedence.- Specified by:
toEPL
in interfaceExpression
- Parameters:
writer
- to useparentPrecedence
- precedence
-
toPrecedenceFreeEPL
protected static void toPrecedenceFreeEPL(String functionName, List<Expression> children, StringWriter writer) Renders child expression of a function in a comma-separated list.- Parameters:
functionName
- function namechildren
- child nodeswriter
- writer
-
toPrecedenceFreeEPL
Render expression list- Parameters:
children
- expressions to renderwriter
- writer to render to
-
renderAggregation
protected static void renderAggregation(StringWriter writer, String name, boolean distinct, List<Expression> children) Render an aggregation function with distinct and parameter expressions- Parameters:
writer
- to render toname
- function namedistinct
- distinct flagchildren
- parameters to render
-
toPrecedenceFreeEPL
Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.- Parameters:
writer
- is the output to use
-