net.sf.letsparty.parser
Class ColumnSynonymsVisitor

java.lang.Object
  extended bynet.sf.letsparty.parser.ColumnSynonymsVisitor
All Implemented Interfaces:
net.sf.jsqlparser.expression.ExpressionVisitor

public class ColumnSynonymsVisitor
extends java.lang.Object
implements net.sf.jsqlparser.expression.ExpressionVisitor

Find "column aliases", such in "select .... WHERE tab1.col1=tab2.col2" This is used in case one of the columns is "partitioned". Example: "select .... where partitionedTab.partitionedCol=tab2.col2 and tab2.col2 = 3". In this case we can assume partitionedTab.partitionedCol=3.


Field Summary
private static int INITIAL_SYN_SIZE
           
private  java.util.Map synonymsMap
           
 
Constructor Summary
ColumnSynonymsVisitor()
           
 
Method Summary
private  void addSynonym(net.sf.jsqlparser.schema.Column column1, net.sf.jsqlparser.schema.Column column2)
           
 java.util.List getSynonymsList(java.lang.String name)
           
 void visit(net.sf.jsqlparser.expression.operators.arithmetic.Addition addition)
           
 void visit(net.sf.jsqlparser.expression.operators.conditional.AndExpression andExpression)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.Between between)
           
 void visit(net.sf.jsqlparser.schema.Column tableColumn)
           
 void visit(net.sf.jsqlparser.expression.DateValue dateValue)
           
 void visit(net.sf.jsqlparser.expression.operators.arithmetic.Division division)
           
 void visit(net.sf.jsqlparser.expression.DoubleValue numberValue)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.EqualsTo equalsTo)
           
 void visit(net.sf.jsqlparser.expression.Function function)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.GreaterThan greaterThan)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals greaterThanEquals)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.InExpression inExpression)
           
 void visit(net.sf.jsqlparser.expression.InverseExpression inverseExpression)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.IsNullExpression isNullExpression)
           
 void visit(net.sf.jsqlparser.expression.JdbcParameter jdbcParameter)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.LikeExpression likeExpression)
           
 void visit(net.sf.jsqlparser.expression.LongValue longValue)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.MinorThan minorThan)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.MinorThanEquals minorThanEquals)
           
 void visit(net.sf.jsqlparser.expression.operators.arithmetic.Multiplication multiplication)
           
 void visit(net.sf.jsqlparser.expression.operators.relational.NotEqualsTo notEqualsTo)
           
 void visit(net.sf.jsqlparser.expression.NullValue nullValue)
           
 void visit(net.sf.jsqlparser.expression.operators.conditional.OrExpression orExpression)
           
 void visit(net.sf.jsqlparser.expression.Parenthesis parenthesis)
           
 void visit(net.sf.jsqlparser.expression.StringValue stringValue)
           
 void visit(net.sf.jsqlparser.statement.select.SubSelect subSelect)
           
 void visit(net.sf.jsqlparser.expression.operators.arithmetic.Subtraction subtraction)
           
 void visit(net.sf.jsqlparser.expression.TimestampValue timestampValue)
           
 void visit(net.sf.jsqlparser.expression.TimeValue timeValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_SYN_SIZE

private static final int INITIAL_SYN_SIZE
See Also:
Constant Field Values

synonymsMap

private java.util.Map synonymsMap
Constructor Detail

ColumnSynonymsVisitor

public ColumnSynonymsVisitor()
Method Detail

getSynonymsList

public java.util.List getSynonymsList(java.lang.String name)

visit

public void visit(net.sf.jsqlparser.expression.Parenthesis parenthesis)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.conditional.AndExpression andExpression)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.EqualsTo equalsTo)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

addSynonym

private void addSynonym(net.sf.jsqlparser.schema.Column column1,
                        net.sf.jsqlparser.schema.Column column2)

visit

public void visit(net.sf.jsqlparser.expression.NullValue nullValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.Function function)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.InverseExpression inverseExpression)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.JdbcParameter jdbcParameter)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.DoubleValue numberValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.StringValue stringValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.arithmetic.Addition addition)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.arithmetic.Division division)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.arithmetic.Multiplication multiplication)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.arithmetic.Subtraction subtraction)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.conditional.OrExpression orExpression)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.Between between)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.GreaterThan greaterThan)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals greaterThanEquals)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.InExpression inExpression)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.IsNullExpression isNullExpression)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.LikeExpression likeExpression)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.MinorThan minorThan)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.MinorThanEquals minorThanEquals)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.operators.relational.NotEqualsTo notEqualsTo)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.schema.Column tableColumn)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.LongValue longValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.statement.select.SubSelect subSelect)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.DateValue dateValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.TimestampValue timestampValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor

visit

public void visit(net.sf.jsqlparser.expression.TimeValue timeValue)
Specified by:
visit in interface net.sf.jsqlparser.expression.ExpressionVisitor