public class DefaultCommand extends Object implements Command
Modifier and Type | Field and Description |
---|---|
protected HandleableException |
handlerException |
protected Queryable |
queryable |
protected CassandraPreparedStatementAdapter<Number,com.datastax.driver.core.Row> |
stmt |
Constructor and Description |
---|
DefaultCommand(Queryable queryable) |
Modifier and Type | Method and Description |
---|---|
<T> T |
execute()
Execute the database statement could be a
Command or a Query |
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 CassandraPreparedStatementAdapter<Number,com.datastax.driver.core.Row> stmt
protected HandleableException handlerException
public DefaultCommand(Queryable queryable)
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
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.