net.sf.jsqlparser.util.deparser
Class ExpressionDeParser

java.lang.Object
  extended by net.sf.jsqlparser.util.deparser.ExpressionDeParser
All Implemented Interfaces:
ExpressionVisitor, ItemsListVisitor

public class ExpressionDeParser
extends java.lang.Object
implements ExpressionVisitor, ItemsListVisitor

A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) an Expression


Field Summary
protected  java.lang.StringBuffer buffer
           
protected  SelectVisitor selectVisitor
           
 
Constructor Summary
ExpressionDeParser()
           
ExpressionDeParser(SelectVisitor selectVisitor, java.lang.StringBuffer buffer)
           
 
Method Summary
 java.lang.StringBuffer getBuffer()
           
 SelectVisitor getSelectVisitor()
           
 void setBuffer(java.lang.StringBuffer buffer)
           
 void setSelectVisitor(SelectVisitor visitor)
           
 void visit(Addition addition)
           
 void visit(AllComparisonExpression allComparisonExpression)
           
 void visit(AndExpression andExpression)
           
 void visit(AnyComparisonExpression anyComparisonExpression)
           
 void visit(Between between)
           
 void visit(CaseExpression caseExpression)
           
 void visit(Column tableColumn)
           
 void visit(DateValue dateValue)
           
 void visit(Division division)
           
 void visit(DoubleValue doubleValue)
           
 void visit(EqualsTo equalsTo)
           
 void visit(ExistsExpression existsExpression)
           
 void visit(ExpressionList expressionList)
           
 void visit(Function function)
           
 void visit(GreaterThan greaterThan)
           
 void visit(GreaterThanEquals greaterThanEquals)
           
 void visit(InExpression inExpression)
           
 void visit(InverseExpression inverseExpression)
           
 void visit(IsNullExpression isNullExpression)
           
 void visit(JdbcParameter jdbcParameter)
           
 void visit(LikeExpression likeExpression)
           
 void visit(LongValue longValue)
           
 void visit(MinorThan minorThan)
           
 void visit(MinorThanEquals minorThanEquals)
           
 void visit(Multiplication multiplication)
           
 void visit(NotEqualsTo notEqualsTo)
           
 void visit(NullValue nullValue)
           
 void visit(OrExpression orExpression)
           
 void visit(Parenthesis parenthesis)
           
 void visit(StringValue stringValue)
           
 void visit(SubSelect subSelect)
           
 void visit(Subtraction subtraction)
           
 void visit(TimestampValue timestampValue)
           
 void visit(TimeValue timeValue)
           
 void visit(WhenClause whenClause)
           
private  void visitBinaryExpression(BinaryExpression binaryExpression, java.lang.String operator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected java.lang.StringBuffer buffer

selectVisitor

protected SelectVisitor selectVisitor
Constructor Detail

ExpressionDeParser

public ExpressionDeParser()

ExpressionDeParser

public ExpressionDeParser(SelectVisitor selectVisitor,
                          java.lang.StringBuffer buffer)
Parameters:
selectVisitor - a SelectVisitor to de-parse SubSelects. It has to share the same
StringBuffer as this object in order to work, as:
 
 StringBuffer myBuf = new StringBuffer();
 MySelectDeparser selectDeparser = new  MySelectDeparser();
 selectDeparser.setBuffer(myBuf);
 ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeparser, myBuf);
 
 
buffer - the buffer that will be filled with the expression
Method Detail

getBuffer

public java.lang.StringBuffer getBuffer()

setBuffer

public void setBuffer(java.lang.StringBuffer buffer)

visit

public void visit(Addition addition)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(AndExpression andExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(Between between)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(Division division)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(DoubleValue doubleValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(EqualsTo equalsTo)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(GreaterThan greaterThan)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(GreaterThanEquals greaterThanEquals)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(InExpression inExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(InverseExpression inverseExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(IsNullExpression isNullExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(JdbcParameter jdbcParameter)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(LikeExpression likeExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(ExistsExpression existsExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(LongValue longValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(MinorThan minorThan)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(MinorThanEquals minorThanEquals)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(Multiplication multiplication)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(NotEqualsTo notEqualsTo)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(NullValue nullValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(OrExpression orExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(Parenthesis parenthesis)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(StringValue stringValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(Subtraction subtraction)
Specified by:
visit in interface ExpressionVisitor

visitBinaryExpression

private void visitBinaryExpression(BinaryExpression binaryExpression,
                                   java.lang.String operator)

visit

public void visit(SubSelect subSelect)
Specified by:
visit in interface ExpressionVisitor
Specified by:
visit in interface ItemsListVisitor

visit

public void visit(Column tableColumn)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(Function function)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(ExpressionList expressionList)
Specified by:
visit in interface ItemsListVisitor

getSelectVisitor

public SelectVisitor getSelectVisitor()

setSelectVisitor

public void setSelectVisitor(SelectVisitor visitor)

visit

public void visit(DateValue dateValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(TimestampValue timestampValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(TimeValue timeValue)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(CaseExpression caseExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(WhenClause whenClause)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(AllComparisonExpression allComparisonExpression)
Specified by:
visit in interface ExpressionVisitor

visit

public void visit(AnyComparisonExpression anyComparisonExpression)
Specified by:
visit in interface ExpressionVisitor