use of org.dbflute.hook.CommonColumnAutoSetupper in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method setupCommonColumnOfInsertIfNeeds.
/**
* Set up common columns of insert if it needs.
* @param entity The entity for insert. (NotNull)
* @param option The optional option of insert. (NotNull, EmptyAllowed: when no option)
*/
protected void setupCommonColumnOfInsertIfNeeds(Entity entity, OptionalThing<InsertOption<? extends ConditionBean>> option) {
if (option.filter(op -> op.isCommonColumnAutoSetupDisabled()).isPresent()) {
return;
}
final CommonColumnAutoSetupper setupper = getCommonColumnAutoSetupper();
assertCommonColumnAutoSetupperNotNull();
setupper.handleCommonColumnOfInsertIfNeeds(entity);
}
use of org.dbflute.hook.CommonColumnAutoSetupper in project dbflute-core by dbflute.
the class AbstractBehaviorWritable method setupCommonColumnOfUpdateIfNeeds.
/**
* Set up common columns of update if it needs.
* @param entity The entity for update. (NotNull)
* @param option The optional option of update. (NotNull, EmptyAllowed: when no option)
*/
protected void setupCommonColumnOfUpdateIfNeeds(Entity entity, OptionalThing<UpdateOption<? extends ConditionBean>> option) {
if (option.filter(op -> op.isCommonColumnAutoSetupDisabled()).isPresent()) {
return;
}
final CommonColumnAutoSetupper setupper = getCommonColumnAutoSetupper();
assertCommonColumnAutoSetupperNotNull();
setupper.handleCommonColumnOfUpdateIfNeeds(entity);
}
Aggregations