Search in sources :

Example 1 with UpdateNonstrictEntityCommand

use of org.dbflute.bhv.core.command.UpdateNonstrictEntityCommand in project dbflute-core by dbflute.

the class AbstractBehaviorWritable method createUpdateNonstrictEntityCommand.

protected UpdateNonstrictEntityCommand createUpdateNonstrictEntityCommand(Entity entity, UpdateOption<? extends ConditionBean> option) {
    assertBehaviorCommandInvoker("createUpdateNonstrictEntityCommand");
    final UpdateNonstrictEntityCommand cmd = newUpdateNonstrictEntityCommand();
    xsetupEntityCommand(cmd, entity);
    cmd.setUpdateOption(option);
    return cmd;
}
Also used : UpdateNonstrictEntityCommand(org.dbflute.bhv.core.command.UpdateNonstrictEntityCommand)

Example 2 with UpdateNonstrictEntityCommand

use of org.dbflute.bhv.core.command.UpdateNonstrictEntityCommand in project dbflute-core by dbflute.

the class AbstractBehaviorWritable method delegateUpdateNonstrict.

protected int delegateUpdateNonstrict(Entity entity, UpdateOption<? extends ConditionBean> option) {
    final OptionalThing<UpdateOption<? extends ConditionBean>> optOption = createOptionalUpdateOption(option);
    adjustEntityBeforeUpdate(entity, optOption);
    final UpdateNonstrictEntityCommand command = createUpdateNonstrictEntityCommand(entity, option);
    RuntimeException cause = null;
    try {
        hookBeforeUpdate(command, entity, emptyOpt(), optOption);
        return invoke(command);
    } catch (RuntimeException e) {
        cause = e;
        throw e;
    } finally {
        hookFinallyUpdate(command, entity, emptyOpt(), optOption, createOptionalCause(cause));
    }
}
Also used : UpdateNonstrictEntityCommand(org.dbflute.bhv.core.command.UpdateNonstrictEntityCommand) UpdateOption(org.dbflute.bhv.writable.UpdateOption) ConditionBean(org.dbflute.cbean.ConditionBean)

Aggregations

UpdateNonstrictEntityCommand (org.dbflute.bhv.core.command.UpdateNonstrictEntityCommand)2 UpdateOption (org.dbflute.bhv.writable.UpdateOption)1 ConditionBean (org.dbflute.cbean.ConditionBean)1