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

public abstract class ExpressionBase extends Object implements Expression
Base expression.
See Also:
  • Constructor Details

    • ExpressionBase

      public ExpressionBase()
      Ctor.
  • Method Details

    • getTreeObjectName

      public 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(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 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(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(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(String functionName, List<Expression> children, StringWriter writer)
      Renders child expression of a function in a comma-separated list.
      Parameters:
      functionName - function name
      children - child nodes
      writer - writer
    • toPrecedenceFreeEPL

      public static void toPrecedenceFreeEPL(List<Expression> children, StringWriter writer)
      Render expression list
      Parameters:
      children - expressions to render
      writer - 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 to
      name - function name
      distinct - distinct flag
      children - parameters to render
    • toPrecedenceFreeEPL

      public abstract void toPrecedenceFreeEPL(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