public class NoCommandHandler extends Object implements CommandHandler
CommandHandler
Modifier and Type | Method and Description |
---|---|
Command |
asCommand()
Retrieve the command implementation for the
Repository like: Update, Select, Batch etc
|
CommandHandler |
checkSqlType(SqlType expected)
If the command isn't the SQL type expected an illegal argument exception is throw.
|
static CommandHandler |
getInstance() |
CommandHandler |
postCallback()
Invoke all post callback methods configured
for the parameters of
Queryable |
CommandHandler |
postCommit()
Invoke all post callback methods, configured to be
executed after a successful commit, for the
parameters of
Queryable . |
CommandHandler |
postException()
Invoke all post callback methods, configured to be
executed after a failure, for the parameters of
Queryable . |
CommandHandler |
preCallback()
Invoke all pre callback methods configured
for the parameters of
Queryable |
<T> T |
run()
Execute the database command
|
CommandHandler |
with(HandleableException handlerException)
Configure the life-cycle with the handler exception
|
CommandHandler |
with(Queryable queryable)
Configure the life-cycle with a
Queryable |
CommandHandler |
with(ResultRow<?,?> overloadResultRow)
Configure the life-cycle with a custom result parser rows of query.
|
CommandHandler |
with(Sql sql)
Configure the life-cycle with a
Sql |
public static CommandHandler getInstance()
public CommandHandler with(ResultRow<?,?> overloadResultRow)
CommandHandler
with
in interface CommandHandler
overloadResultRow
- customized result row to parserpublic CommandHandler with(Queryable queryable)
CommandHandler
Queryable
with
in interface CommandHandler
queryable
- query name and yours parameterspublic CommandHandler with(Sql sql)
CommandHandler
Sql
with
in interface CommandHandler
sql
- Dynamic SQLpublic CommandHandler with(HandleableException handlerException)
CommandHandler
with
in interface CommandHandler
handlerException
- rules to handler the all exceptionspublic Command asCommand()
CommandHandler
asCommand
in interface CommandHandler
public CommandHandler preCallback()
CommandHandler
Queryable
preCallback
in interface CommandHandler
public CommandHandler postCallback()
CommandHandler
Queryable
postCallback
in interface CommandHandler
public CommandHandler postCommit()
CommandHandler
Queryable
.postCommit
in interface CommandHandler
public CommandHandler postException()
CommandHandler
Queryable
.postException
in interface CommandHandler
public <T> T run()
CommandHandler
run
in interface CommandHandler
T
- Generic type of return, example: rows affected by a command or list of objects.public CommandHandler checkSqlType(SqlType expected)
CommandHandler
checkSqlType
in interface CommandHandler
expected
- type of SQL expectedCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.