com.espertech.esper.client.soda
Class ExpressionBase

java.lang.Object
  extended by com.espertech.esper.client.soda.ExpressionBase
All Implemented Interfaces:
Expression, java.io.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, SubstitutionParameterExpressionBase, SumProjectionExpression, TableAccessExpression, TimePeriodExpression, TypeOfExpression, WildcardExpression

public abstract class ExpressionBase
extends java.lang.Object
implements Expression

Base expression.

See Also:
Serialized Form

Constructor Summary
ExpressionBase()
          Ctor.
 
Method Summary
 void addChild(Expression expression)
          Adds a new child expression to the current expression.
 java.util.List<Expression> getChildren()
          Returns the list of sub-expressions to the current expression.
 java.lang.String getTreeObjectName()
          Returns the tree of object name, for use by tools to assign an identifier to an expression.
protected static void renderAggregation(java.io.StringWriter writer, java.lang.String name, boolean distinct, java.util.List<Expression> children)
          Render an aggregation function with distinct and parameter expressions
 void setChildren(java.util.List<Expression> children)
          Sets the list of sub-expressions (child expressions) to the current expression node.
 void setTreeObjectName(java.lang.String treeObjectName)
          Sets the tree of object name, for use by tools to assign an identifier to an expression.
 void toEPL(java.io.StringWriter writer, ExpressionPrecedenceEnum parentPrecedence)
          Write expression considering precedence.
protected static void toPrecedenceFreeEPL(java.util.List<Expression> children, java.io.StringWriter writer)
          Render expression list
protected static void toPrecedenceFreeEPL(java.lang.String functionName, java.util.List<Expression> children, java.io.StringWriter writer)
          Renders child expression of a function in a comma-separated list.
abstract  void toPrecedenceFreeEPL(java.io.StringWriter writer)
          Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.client.soda.Expression
getPrecedence
 

Constructor Detail

ExpressionBase

public ExpressionBase()
Ctor.

Method Detail

getTreeObjectName

public java.lang.String 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 interface Expression
Returns:
tree object id

setTreeObjectName

public void setTreeObjectName(java.lang.String treeObjectName)
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 interface Expression
Parameters:
treeObjectName - tree object id

getChildren

public java.util.List<Expression> getChildren()
Returns the list of sub-expressions to the current expression.

Specified by:
getChildren in interface Expression
Returns:
list of child expressions

addChild

public void addChild(Expression expression)
Adds a new child expression to the current expression.

Parameters:
expression - to add

setChildren

public void setChildren(java.util.List<Expression> children)
Description copied from interface: Expression
Sets the list of sub-expressions (child expressions) to the current expression node.

Specified by:
setChildren in interface Expression
Parameters:
children - child expressions or empty list if there are no child expressions

toEPL

public final void toEPL(java.io.StringWriter writer,
                        ExpressionPrecedenceEnum parentPrecedence)
Description copied from interface: Expression
Write expression considering precedence.

Specified by:
toEPL in interface Expression
Parameters:
writer - to use
parentPrecedence - precedence

toPrecedenceFreeEPL

protected static void toPrecedenceFreeEPL(java.lang.String functionName,
                                          java.util.List<Expression> children,
                                          java.io.StringWriter writer)
Renders child expression of a function in a comma-separated list.

Parameters:
functionName - function name
children - child nodes
writer - writer

toPrecedenceFreeEPL

protected static void toPrecedenceFreeEPL(java.util.List<Expression> children,
                                          java.io.StringWriter writer)
Render expression list

Parameters:
children - expressions to render
writer - writer to render to

renderAggregation

protected static void renderAggregation(java.io.StringWriter writer,
                                        java.lang.String name,
                                        boolean distinct,
                                        java.util.List<Expression> children)
Render an aggregation function with distinct and parameter expressions

Parameters:
writer - to render to
name - function name
distinct - distinct flag
children - parameters to render

toPrecedenceFreeEPL

public abstract void toPrecedenceFreeEPL(java.io.StringWriter writer)
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

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com