public abstract class AbstractJdbcCommand extends Object implements Command
Modifier and Type | Field and Description |
---|---|
protected CommandHandler |
commandHandler |
protected Connection |
conn |
protected HandleableException |
handlerException |
protected Queryable |
queryable |
protected StatementAdapter<?,ResultSet> |
stmt |
Modifier | Constructor and Description |
---|---|
protected |
AbstractJdbcCommand(Queryable queryable,
Connection conn) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(PreparedStatement stmt) |
protected int |
executeBulk() |
protected int |
simpleExecute() |
Command |
with(CommandHandler commandHandler)
Configure the life-cycle of command
|
Command |
with(HandleableException handlerException)
Configure the handler exception for the command
|
<T> Command |
with(T stmt)
The statement to run this command
|
protected HandleableException handlerException
protected CommandHandler commandHandler
protected StatementAdapter<?,ResultSet> stmt
protected final Connection conn
protected AbstractJdbcCommand(Queryable queryable, Connection conn)
public <T> Command with(T stmt)
Command
with
in interface Command
T
- Type responsible to execute the statement into database.
For example: Statement
for JDBC or Cassandra, EntityManager
for JPA,
bucket
for Couchbase etcstmt
- a statement implementation to run the command.public Command with(HandleableException handlerException)
Command
public Command with(CommandHandler commandHandler)
Command
protected int executeBulk()
protected int simpleExecute()
protected void close(PreparedStatement stmt)
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.