public interface 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.
|
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<?,?> customResultRow)
Configure the life-cycle with a custom result parser rows of query.
|
CommandHandler |
with(Sql sql)
Configure the life-cycle with a
Sql |
CommandHandler with(Queryable queryable)
Queryable
queryable
- query name and yours parametersCommandHandler with(Sql sql)
Sql
sql
- Dynamic SQLCommandHandler with(ResultRow<?,?> customResultRow)
customResultRow
- customized result row to parserCommandHandler with(HandleableException handlerException)
handlerException
- rules to handler the all exceptionsCommand asCommand()
CommandHandler preCallback()
Queryable
CommandHandler postCallback()
Queryable
CommandHandler postCommit()
Queryable
.CommandHandler postException()
Queryable
.<T> T run()
T
- Generic type of return, example: rows affected by a command or list of objects.CommandHandler checkSqlType(SqlType expected)
expected
- type of SQL expectedIllegalArgumentException
- if Sql
isn't the expected SqlType
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.