org.oddjob.sql
Class ParameterisedExecutor
java.lang.Object
org.oddjob.sql.ParameterisedExecutor
- All Implemented Interfaces:
- ArooaSessionAware, BusAware, Destination<String>, SQLExecutor
public class ParameterisedExecutor
- extends Object
- implements ArooaSessionAware, SQLExecutor, BusAware
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParameterisedExecutor
public ParameterisedExecutor()
setArooaSession
public void setArooaSession(ArooaSession session)
- Specified by:
setArooaSession in interface ArooaSessionAware
accept
public void accept(String sql)
throws BadBeanException
- Description copied from interface:
SQLExecutor
- Execute the SQL.
- Specified by:
accept in interface Destination<String>- Specified by:
accept in interface SQLExecutor
- Parameters:
sql - The SQL. Never expected to be null.
- Throws:
BadBeanException
execute
public void execute(String sql)
throws SQLException,
NoConversionAvailableException,
ConversionFailedException,
BusException,
ClassNotFoundException
- Exec the sql statement.
- Parameters:
sql - the SQL statement to executeout - the place to put output
- Throws:
SQLException - on SQL problems
ConversionFailedException
NoConversionAvailableException
BusException
ClassNotFoundException
stop
public void stop()
setBus
public void setBus(BeanBus bus)
- Specified by:
setBus in interface BusAware
setResultProcessor
public void setResultProcessor(SQLResultsProcessor processor)
getConnection
public Connection getConnection()
setConnection
public void setConnection(Connection connection)
setAutocommit
public void setAutocommit(boolean autocommit)
- Auto commit flag for database connection;
optional, default false.
- Parameters:
autocommit - The autocommit to set
isAutocommit
public boolean isAutocommit()
isEscapeProcessing
public boolean isEscapeProcessing()
setEscapeProcessing
public void setEscapeProcessing(boolean escapeProcessing)
getParameters
public ValueType getParameters(int index)
setParameters
public void setParameters(int index,
ValueType parameter)
isCallable
public boolean isCallable()
setCallable
public void setCallable(boolean callable)
getExecutedSQLCount
public int getExecutedSQLCount()
getSuccessfulSQLCount
public int getSuccessfulSQLCount()