to.etc.webapp.qsql
Class JdbcSQLGenerator
java.lang.Object
to.etc.webapp.query.QNodeVisitorBase
to.etc.webapp.qsql.JdbcSQLGenerator
- All Implemented Interfaces:
- QNodeVisitor
public class JdbcSQLGenerator
- extends QNodeVisitorBase
Generate a SQL query from a QCriteria selection using the poor man's JDBC code.
- Author:
- Frits Jalvingh
Created on Aug 25, 2009
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcSQLGenerator
public JdbcSQLGenerator()
visitCriteria
public void visitCriteria(QCriteria<?> qc)
throws java.lang.Exception
- Specified by:
visitCriteria
in interface QNodeVisitor
- Overrides:
visitCriteria
in class QNodeVisitorBase
- Throws:
java.lang.Exception
visitSelection
public void visitSelection(QSelection<?> s)
throws java.lang.Exception
- Specified by:
visitSelection
in interface QNodeVisitor
- Overrides:
visitSelection
in class QNodeVisitorBase
- Throws:
java.lang.Exception
getSQL
public java.lang.String getSQL()
throws java.lang.Exception
- Throws:
java.lang.Exception
getValList
public java.util.List<IQValueSetter> getValList()
getRetrieverList
public java.util.List<to.etc.webapp.qsql.IInstanceMaker> getRetrieverList()
getQuery
public JdbcQuery<?> getQuery()
throws java.lang.Exception
- Throws:
java.lang.Exception
visitOrder
public void visitOrder(QOrder o)
throws java.lang.Exception
- Specified by:
visitOrder
in interface QNodeVisitor
- Overrides:
visitOrder
in class QNodeVisitorBase
- Throws:
java.lang.Exception
visitMulti
public void visitMulti(QMultiNode n)
throws java.lang.Exception
- Render an operator set.
- Specified by:
visitMulti
in interface QNodeVisitor
- Overrides:
visitMulti
in class QNodeVisitorBase
- Throws:
java.lang.Exception
- See Also:
QNodeVisitorBase.visitMulti(to.etc.webapp.query.QMultiNode)
visitPropertyComparison
public void visitPropertyComparison(QPropertyComparison n)
throws java.lang.Exception
- Specified by:
visitPropertyComparison
in interface QNodeVisitor
- Overrides:
visitPropertyComparison
in class QNodeVisitorBase
- Throws:
java.lang.Exception
visitUnaryProperty
public void visitUnaryProperty(QUnaryProperty n)
throws java.lang.Exception
- Specified by:
visitUnaryProperty
in interface QNodeVisitor
- Overrides:
visitUnaryProperty
in class QNodeVisitorBase
- Throws:
java.lang.Exception
visitBetween
public void visitBetween(QBetweenNode n)
throws java.lang.Exception
- Specified by:
visitBetween
in interface QNodeVisitor
- Overrides:
visitBetween
in class QNodeVisitorBase
- Throws:
java.lang.Exception
visitLiteral
public void visitLiteral(QLiteral n)
throws java.lang.Exception
- Specified by:
visitLiteral
in interface QNodeVisitor
- Overrides:
visitLiteral
in class QNodeVisitorBase
- Throws:
java.lang.Exception
getOperationPrecedence
public static int getOperationPrecedence(QOperation ot)
- Returns the operator precedence
- Parameters:
ot
-
- Returns:
visitUnaryNode
public void visitUnaryNode(QUnaryNode n)
throws java.lang.Exception
- Specified by:
visitUnaryNode
in interface QNodeVisitor
- Overrides:
visitUnaryNode
in class QNodeVisitorBase
- Throws:
java.lang.Exception