com.espertech.esper.epl.core
Class ColumnNamedNodeSwapper

java.lang.Object
  extended by com.espertech.esper.epl.core.ColumnNamedNodeSwapper

public class ColumnNamedNodeSwapper
extends java.lang.Object

A utility class for replacing select-clause column names with their definitions in expression node trees.


Constructor Summary
ColumnNamedNodeSwapper()
           
 
Method Summary
static ExprNode swap(ExprNode exprTree, java.lang.String columnName, ExprNode fullExpr)
          Replace all instances of the node representing the colum name with the full expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnNamedNodeSwapper

public ColumnNamedNodeSwapper()
Method Detail

swap

public static ExprNode swap(ExprNode exprTree,
                            java.lang.String columnName,
                            ExprNode fullExpr)
Replace all instances of the node representing the colum name with the full expression.

Parameters:
exprTree - - the expression node tree to make the changes in
columnName - - the select-clause name that is to be expanded
fullExpr - - the full expression that the column name represents
Returns:
exprTree with the appropriate swaps performed, or fullExpr, if all of exprTree needed to be swapped

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