Package org.teiid.translator.jdbc
Class JDBCBaseExecution
- java.lang.Object
-
- org.teiid.translator.jdbc.JDBCBaseExecution
-
- All Implemented Interfaces:
org.teiid.translator.Execution
- Direct Known Subclasses:
JDBCQueryExecution,JDBCUpdateExecution
public abstract class JDBCBaseExecution extends Object implements org.teiid.translator.Execution
-
-
Field Summary
Fields Modifier and Type Field Description protected org.teiid.language.Commandcommandprotected Connectionconnectionprotected org.teiid.translator.ExecutionContextcontextprotected JDBCExecutionFactoryexecutionFactoryprotected intfetchSizeprotected Statementstatementprotected booleantrimString
-
Constructor Summary
Constructors Modifier Constructor Description protectedJDBCBaseExecution(org.teiid.language.Command command, Connection connection, org.teiid.translator.ExecutionContext context, JDBCExecutionFactory jef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStatementWarnings()protected voidbind(PreparedStatement stmt, List<?> params, List<?> batchValues)Bind the values in the TranslatedCommand to the PreparedStatementvoidcancel()voidclose()protected CallableStatementgetCallableStatement(String sql)ConnectiongetConnection()Returns the JDBC connection used by the execution object.protected PreparedStatementgetPreparedStatement(String sql)protected StatementgetStatement()protected voidsetSizeContraints(Statement statement)protected TranslatedCommandtranslateCommand(org.teiid.language.Command command)
-
-
-
Field Detail
-
connection
protected Connection connection
-
context
protected org.teiid.translator.ExecutionContext context
-
executionFactory
protected JDBCExecutionFactory executionFactory
-
command
protected org.teiid.language.Command command
-
trimString
protected boolean trimString
-
fetchSize
protected int fetchSize
-
statement
protected volatile Statement statement
-
-
Constructor Detail
-
JDBCBaseExecution
protected JDBCBaseExecution(org.teiid.language.Command command, Connection connection, org.teiid.translator.ExecutionContext context, JDBCExecutionFactory jef)
-
-
Method Detail
-
bind
protected void bind(PreparedStatement stmt, List<?> params, List<?> batchValues) throws SQLException
Bind the values in the TranslatedCommand to the PreparedStatement- Throws:
SQLException
-
translateCommand
protected TranslatedCommand translateCommand(org.teiid.language.Command command) throws org.teiid.translator.TranslatorException
- Throws:
org.teiid.translator.TranslatorException
-
close
public void close()
- Specified by:
closein interfaceorg.teiid.translator.Execution
-
cancel
public void cancel() throws org.teiid.translator.TranslatorException- Specified by:
cancelin interfaceorg.teiid.translator.Execution- Throws:
org.teiid.translator.TranslatorException
-
setSizeContraints
protected void setSizeContraints(Statement statement)
-
getStatement
protected Statement getStatement() throws SQLException
- Throws:
SQLException
-
getCallableStatement
protected CallableStatement getCallableStatement(String sql) throws SQLException
- Throws:
SQLException
-
getPreparedStatement
protected PreparedStatement getPreparedStatement(String sql) throws SQLException
- Throws:
SQLException
-
getConnection
public Connection getConnection()
Returns the JDBC connection used by the execution object.- Returns:
- Returns the connection.
- Since:
- 4.1.1
-
addStatementWarnings
public void addStatementWarnings() throws SQLException- Throws:
SQLException
-
-