use of org.dbflute.bhv.core.command.QueryDeleteCBCommand in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method delegateQueryDelete.
protected int delegateQueryDelete(ConditionBean cb, DeleteOption<? extends ConditionBean> option) {
final OptionalThing<DeleteOption<? extends ConditionBean>> optOption = createOptionalDeleteOption(option);
adjustEntityBeforeQueryDelete(cb, optOption);
final QueryDeleteCBCommand command = createQueryDeleteCBCommand(cb, option);
final OptionalThing<ConditionBean> optCB = OptionalThing.of(cb);
RuntimeException cause = null;
try {
hookBeforeDelete(command, emptyOpt(), optCB, optOption);
return invoke(command);
} catch (RuntimeException e) {
cause = e;
throw e;
} finally {
hookFinallyDelete(command, emptyOpt(), optCB, optOption, createOptionalCause(cause));
}
}
use of org.dbflute.bhv.core.command.QueryDeleteCBCommand in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method createQueryDeleteCBCommand.
protected QueryDeleteCBCommand createQueryDeleteCBCommand(ConditionBean cb, DeleteOption<? extends ConditionBean> option) {
assertBehaviorCommandInvoker("createQueryDeleteCBCommand");
final QueryDeleteCBCommand cmd = new QueryDeleteCBCommand();
cmd.setTableDbName(asTableDbName());
_behaviorCommandInvoker.injectComponentProperty(cmd);
cmd.setConditionBean(cb);
cmd.setDeleteOption(option);
return cmd;
}
Aggregations