net.sf.letsparty.statement
Class SelectHandler

java.lang.Object
  extended bynet.sf.letsparty.driver.BasicPreparedStatement
      extended bynet.sf.letsparty.statement.SelectHandler
All Implemented Interfaces:
net.sf.jsqlparser.statement.select.FromItemVisitor, Permutable, java.sql.PreparedStatement, net.sf.jsqlparser.statement.select.SelectVisitor, java.sql.Statement

public class SelectHandler
extends BasicPreparedStatement
implements net.sf.jsqlparser.statement.select.FromItemVisitor, net.sf.jsqlparser.statement.select.SelectVisitor, Permutable


Field Summary
protected  int combinationsNumber
           
protected  int[] indexes
           
protected  boolean isJoinVisiting
           
protected  java.util.Map joinsRightItems
           
protected  PartExpressionVisitor partExpressionVisitor
           
protected  PartTableVisitor partTableVisitor
           
protected  java.sql.PreparedStatement realPreparedStatement
           
protected  net.sf.jsqlparser.statement.select.Select select
           
protected  SelectDeParser selectDeParser
           
private  java.lang.String selectItemsString
           
protected  java.lang.String sqlQuery
           
protected  java.lang.StringBuffer stringBuffer
           
protected  java.util.List[] tableListOfTablesNotJoins
           
private  java.lang.String whereClauseString
           
 
Fields inherited from class net.sf.letsparty.driver.BasicPreparedStatement
connection, jdbcParsHandler
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Constructor Summary
SelectHandler(PartTableVisitor partTableVisitor, net.sf.jsqlparser.statement.select.Select select, java.lang.String sqlQuery, PartExpressionVisitor partExpressionVisitor, Connection connection)
           
 
Method Summary
 void addBatch()
           
 void addBatch(java.lang.String arg0)
           
 void cancel()
           
 void clearBatch()
           
 void clearWarnings()
           
 void close()
           
protected  java.lang.String constructJoin(java.util.List tableList)
           
 boolean execute()
           
 int[] executeBatch()
           
 java.sql.ResultSet executeQuery()
           
 java.sql.ResultSet executeQuery(java.lang.String arg0)
           
 int executeUpdate()
           
 java.sql.Connection getConnection()
           
 java.sql.ResultSet getGeneratedKeys()
           
 int[] getIndexes()
           
 java.sql.ResultSetMetaData getMetaData()
           
 boolean getMoreResults()
           
 boolean getMoreResults(int arg0)
           
 java.sql.ParameterMetaData getParameterMetaData()
           
 java.sql.ResultSet getResultSet()
           
 int getResultSetConcurrency()
           
 int getResultSetHoldability()
           
 int getResultSetType()
           
protected  java.lang.String getSqlString()
           
 int getUpdateCount()
           
 java.sql.SQLWarning getWarnings()
           
 void onPermutation()
           
protected  void setParameters(java.sql.PreparedStatement preparedStatement)
          Set the jdbc values collected in the preparedStatement
 void visit(net.sf.jsqlparser.statement.select.PlainSelect plainSelect)
           
 void visit(net.sf.jsqlparser.statement.select.SubSelect subSelect)
           
 void visit(net.sf.jsqlparser.schema.Table tableName)
           
 void visit(net.sf.jsqlparser.statement.select.Union union)
           
 
Methods inherited from class net.sf.letsparty.driver.BasicPreparedStatement
clearParameters, constructPartitionedTableSuffixList, constructTableListOfTables, execute, execute, execute, execute, executeChangingName, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getQueryTimeout, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setCursorName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setParameters, setParameters, setQueryTimeout, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

select

protected net.sf.jsqlparser.statement.select.Select select

sqlQuery

protected java.lang.String sqlQuery

partExpressionVisitor

protected PartExpressionVisitor partExpressionVisitor

partTableVisitor

protected PartTableVisitor partTableVisitor

realPreparedStatement

protected java.sql.PreparedStatement realPreparedStatement

tableListOfTablesNotJoins

protected java.util.List[] tableListOfTablesNotJoins

joinsRightItems

protected java.util.Map joinsRightItems

indexes

protected int[] indexes

stringBuffer

protected java.lang.StringBuffer stringBuffer

isJoinVisiting

protected boolean isJoinVisiting

combinationsNumber

protected int combinationsNumber

selectDeParser

protected SelectDeParser selectDeParser

selectItemsString

private java.lang.String selectItemsString

whereClauseString

private java.lang.String whereClauseString
Constructor Detail

SelectHandler

public SelectHandler(PartTableVisitor partTableVisitor,
                     net.sf.jsqlparser.statement.select.Select select,
                     java.lang.String sqlQuery,
                     PartExpressionVisitor partExpressionVisitor,
                     Connection connection)
Method Detail

setParameters

protected void setParameters(java.sql.PreparedStatement preparedStatement)
                      throws java.sql.SQLException
Description copied from class: BasicPreparedStatement
Set the jdbc values collected in the preparedStatement

Overrides:
setParameters in class BasicPreparedStatement
Parameters:
preparedStatement -
Throws:
java.sql.SQLException

getSqlString

protected java.lang.String getSqlString()
                                 throws java.sql.SQLException
Throws:
java.sql.SQLException

onPermutation

public void onPermutation()
Specified by:
onPermutation in interface Permutable

constructJoin

protected java.lang.String constructJoin(java.util.List tableList)

visit

public void visit(net.sf.jsqlparser.schema.Table tableName)
Specified by:
visit in interface net.sf.jsqlparser.statement.select.FromItemVisitor

visit

public void visit(net.sf.jsqlparser.statement.select.PlainSelect plainSelect)
Specified by:
visit in interface net.sf.jsqlparser.statement.select.SelectVisitor

visit

public void visit(net.sf.jsqlparser.statement.select.Union union)
Specified by:
visit in interface net.sf.jsqlparser.statement.select.SelectVisitor

addBatch

public void addBatch()
              throws java.sql.SQLException
Specified by:
addBatch in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

execute

public boolean execute()
                throws java.sql.SQLException
Specified by:
execute in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Specified by:
executeQuery in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Specified by:
executeUpdate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
Specified by:
getMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
Specified by:
getParameterMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

addBatch

public void addBatch(java.lang.String arg0)
              throws java.sql.SQLException
Specified by:
addBatch in interface java.sql.Statement
Throws:
java.sql.SQLException

cancel

public void cancel()
            throws java.sql.SQLException
Specified by:
cancel in interface java.sql.Statement
Throws:
java.sql.SQLException

clearBatch

public void clearBatch()
                throws java.sql.SQLException
Specified by:
clearBatch in interface java.sql.Statement
Throws:
java.sql.SQLException

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
Specified by:
clearWarnings in interface java.sql.Statement
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Specified by:
close in interface java.sql.Statement
Throws:
java.sql.SQLException

executeBatch

public int[] executeBatch()
                   throws java.sql.SQLException
Specified by:
executeBatch in interface java.sql.Statement
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface java.sql.Statement
Overrides:
getConnection in class BasicPreparedStatement
Throws:
java.sql.SQLException

getGeneratedKeys

public java.sql.ResultSet getGeneratedKeys()
                                    throws java.sql.SQLException
Specified by:
getGeneratedKeys in interface java.sql.Statement
Throws:
java.sql.SQLException

getMoreResults

public boolean getMoreResults()
                       throws java.sql.SQLException
Specified by:
getMoreResults in interface java.sql.Statement
Throws:
java.sql.SQLException

getMoreResults

public boolean getMoreResults(int arg0)
                       throws java.sql.SQLException
Specified by:
getMoreResults in interface java.sql.Statement
Throws:
java.sql.SQLException

getResultSet

public java.sql.ResultSet getResultSet()
                                throws java.sql.SQLException
Specified by:
getResultSet in interface java.sql.Statement
Throws:
java.sql.SQLException

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws java.sql.SQLException
Specified by:
getResultSetConcurrency in interface java.sql.Statement
Throws:
java.sql.SQLException

getResultSetHoldability

public int getResultSetHoldability()
                            throws java.sql.SQLException
Specified by:
getResultSetHoldability in interface java.sql.Statement
Throws:
java.sql.SQLException

getResultSetType

public int getResultSetType()
                     throws java.sql.SQLException
Specified by:
getResultSetType in interface java.sql.Statement
Throws:
java.sql.SQLException

getUpdateCount

public int getUpdateCount()
                   throws java.sql.SQLException
Specified by:
getUpdateCount in interface java.sql.Statement
Throws:
java.sql.SQLException

getWarnings

public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
Specified by:
getWarnings in interface java.sql.Statement
Throws:
java.sql.SQLException

visit

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

getIndexes

public int[] getIndexes()
Specified by:
getIndexes in interface Permutable

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String arg0)
                                throws java.sql.SQLException
Specified by:
executeQuery in interface java.sql.Statement
Throws:
java.sql.SQLException