use of org.dbflute.bhv.core.command.BatchUpdateNonstrictCommand in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method delegateBatchUpdateNonstrict.
protected int[] delegateBatchUpdateNonstrict(List<? extends Entity> entityList, UpdateOption<? extends ConditionBean> option) {
if (entityList.isEmpty()) {
return EMPTY_INT_ARRAY;
}
final OptionalThing<UpdateOption<? extends ConditionBean>> optOption = createOptionalUpdateOption(option);
adjustEntityListBeforeBatchUpdate(entityList, option, true);
if (entityList.isEmpty()) {
// might be filtered
return EMPTY_INT_ARRAY;
}
final BatchUpdateNonstrictCommand command = createBatchUpdateNonstrictCommand(entityList, option);
RuntimeException cause = null;
try {
hookBeforeUpdate(command, entityList, emptyOpt(), optOption);
return invoke(command);
} catch (RuntimeException e) {
cause = e;
throw e;
} finally {
hookFinallyUpdate(command, entityList, emptyOpt(), optOption, createOptionalCause(cause));
}
}
use of org.dbflute.bhv.core.command.BatchUpdateNonstrictCommand in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method createBatchUpdateNonstrictCommand.
protected BatchUpdateNonstrictCommand createBatchUpdateNonstrictCommand(List<? extends Entity> entityList, UpdateOption<? extends ConditionBean> option) {
assertBehaviorCommandInvoker("createBatchUpdateNonstrictCommand");
final BatchUpdateNonstrictCommand cmd = newBatchUpdateNonstrictCommand();
setupListEntityCommand(cmd, entityList);
cmd.setUpdateOption(option);
return cmd;
}
Aggregations