org.teiid.connector.jdbc
Class JDBCQueryExecution

java.lang.Object
  extended by org.teiid.connector.basic.BasicExecution
      extended by org.teiid.connector.jdbc.JDBCBaseExecution
          extended by org.teiid.connector.jdbc.JDBCQueryExecution
All Implemented Interfaces:
Execution, ResultSetExecution
Direct Known Subclasses:
JDBCProcedureExecution

public class JDBCQueryExecution
extends JDBCBaseExecution
implements ResultSetExecution


Field Summary
protected  java.lang.Class<?>[] columnDataTypes
           
protected  ICommand command
           
protected  ConnectorEnvironment env
           
protected  java.sql.ResultSet results
           
 
Fields inherited from class org.teiid.connector.jdbc.JDBCBaseExecution
connection, context, fetchSize, id, logger, maxResultRows, sqlTranslator, statement, trimString
 
Constructor Summary
JDBCQueryExecution(ICommand command, java.sql.Connection connection, Translator sqlTranslator, ConnectorLogger logger, java.util.Properties props, ExecutionContext context, ConnectorEnvironment env)
           
 
Method Summary
 void close()
          Terminates the execution normally.
 void execute()
          Execute the associated command.
protected  void initResultSetInfo()
           
 java.util.List<?> next()
           
static java.lang.String trimString(java.lang.String value)
          Expects string to never be null
 
Methods inherited from class org.teiid.connector.jdbc.JDBCBaseExecution
addStatementWarnings, bindPreparedStatementValues, cancel, getCallableStatement, getConnection, getPreparedStatement, getSqlTranslator, getStatement, setSizeContraints, translateCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.teiid.connector.api.Execution
cancel
 

Field Detail

results

protected java.sql.ResultSet results

env

protected ConnectorEnvironment env

command

protected ICommand command

columnDataTypes

protected java.lang.Class<?>[] columnDataTypes
Constructor Detail

JDBCQueryExecution

public JDBCQueryExecution(ICommand command,
                          java.sql.Connection connection,
                          Translator sqlTranslator,
                          ConnectorLogger logger,
                          java.util.Properties props,
                          ExecutionContext context,
                          ConnectorEnvironment env)
Method Detail

execute

public void execute()
             throws ConnectorException
Description copied from interface: Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.

Specified by:
execute in interface Execution
Throws:
ConnectorException

initResultSetInfo

protected void initResultSetInfo()
                          throws java.sql.SQLException
Throws:
java.sql.SQLException

next

public java.util.List<?> next()
                       throws ConnectorException,
                              DataNotAvailableException
Specified by:
next in interface ResultSetExecution
Throws:
ConnectorException
DataNotAvailableException

trimString

public static java.lang.String trimString(java.lang.String value)
Expects string to never be null

Parameters:
value - Incoming value
Returns:
Right trimmed value
Since:
4.2

close

public void close()
           throws ConnectorException
Description copied from interface: Execution
Terminates the execution normally.

Specified by:
close in interface Execution
Overrides:
close in class JDBCBaseExecution
Throws:
ConnectorException
See Also:
JDBCBaseExecution.close()


Copyright © 2009. All Rights Reserved.