use of org.dbflute.bhv.core.command.QueryUpdateCBCommand in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method delegateQueryUpdate.
protected int delegateQueryUpdate(Entity entity, ConditionBean cb, UpdateOption<? extends ConditionBean> option) {
final OptionalThing<UpdateOption<? extends ConditionBean>> optOption = createOptionalUpdateOption(option);
adjustEntityBeforeQueryUpdate(entity, cb, optOption);
final QueryUpdateCBCommand command = createQueryUpdateCBCommand(entity, cb, option);
final OptionalThing<ConditionBean> optCB = OptionalThing.of(cb);
RuntimeException cause = null;
try {
hookBeforeUpdate(command, entity, optCB, optOption);
return invoke(command);
} catch (RuntimeException e) {
cause = e;
throw e;
} finally {
hookFinallyUpdate(command, entity, optCB, optOption, createOptionalCause(cause));
}
}
use of org.dbflute.bhv.core.command.QueryUpdateCBCommand in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method createQueryUpdateCBCommand.
protected QueryUpdateCBCommand createQueryUpdateCBCommand(Entity entity, ConditionBean cb, UpdateOption<? extends ConditionBean> option) {
assertBehaviorCommandInvoker("createQueryUpdateCBCommand");
final QueryUpdateCBCommand cmd = new QueryUpdateCBCommand();
cmd.setTableDbName(asTableDbName());
_behaviorCommandInvoker.injectComponentProperty(cmd);
cmd.setEntity(entity);
cmd.setConditionBean(cb);
cmd.setUpdateOption(option);
return cmd;
}
Aggregations