|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.beanbus.AbstractDestination<String>
org.oddjob.sql.ParameterisedExecutor
public class ParameterisedExecutor
Handles the execution of a single SQL statement at a time.
Constructor Summary | |
---|---|
ParameterisedExecutor()
|
Method Summary | |
---|---|
boolean |
add(String sql)
|
void |
execute(String sql)
Execute the SQL statement. |
DatabaseDialect |
getDialect()
|
int |
getExecutedSQLCount()
Getter for executedSQLCount. |
ValueType |
getParameters(int index)
Get parameter by index. |
int |
getSuccessfulSQLCount()
Getter for successful SQL count. |
boolean |
isAutocommit()
Getter for autocommit. |
boolean |
isCallable()
Getter for callable statement flag. |
boolean |
isEscapeProcessing()
Getter for escapeProcessing. |
void |
setArooaSession(ArooaSession session)
|
void |
setAutocommit(boolean autocommit)
Auto commit flag for database connection; optional, default false. |
void |
setBeanBus(BusConductor busConductor)
|
void |
setCallable(boolean callable)
Setter for callable statement flag. |
void |
setConnection(Connection connection)
Set the connection to use. |
void |
setDialect(DatabaseDialect dialect)
|
void |
setEscapeProcessing(boolean escapeProcessing)
Setter for escapeProcessing. |
void |
setParameters(int index,
ValueType parameter)
Set parameter by index. |
void |
setResultProcessor(SQLResultHandler processor)
Set the result processor. |
Methods inherited from class org.oddjob.beanbus.AbstractDestination |
---|
addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public ParameterisedExecutor()
Method Detail |
---|
public void setArooaSession(ArooaSession session)
setArooaSession
in interface ArooaSessionAware
public boolean add(String sql)
add
in interface Collection<String>
public void execute(String sql) throws SQLException, ArooaConversionException, BusException, ClassNotFoundException
sql
- the SQL statement to execute
SQLException
- on SQL problems
ConversionFailedException
NoConversionAvailableException
BusException
ClassNotFoundException
ArooaConversionException
@Inject public void setBeanBus(BusConductor busConductor)
public void setResultProcessor(SQLResultHandler processor)
processor
- The result processor to pass results to.public void setConnection(Connection connection)
connection
- The connection.public void setAutocommit(boolean autocommit)
autocommit
- The autocommit to setpublic boolean isAutocommit()
public boolean isEscapeProcessing()
public void setEscapeProcessing(boolean escapeProcessing)
escapeProcessing
- escapeProcessing flag.public ValueType getParameters(int index) throws IndexOutOfBoundsException
index
- The index.
IndexOutOfBoundsException
public void setParameters(int index, ValueType parameter) throws IndexOutOfBoundsException
index
- The index.parameter
- The parameter. Null to remove.
IndexOutOfBoundsException
public boolean isCallable()
public void setCallable(boolean callable)
callable
- The callable flag.public int getExecutedSQLCount()
public int getSuccessfulSQLCount()
public DatabaseDialect getDialect()
public void setDialect(DatabaseDialect dialect)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |