Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2014-2015 the original author or authors.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  * either express or implied. See the License for the specific language
  * governing permissions and limitations under the License.
  */
 package org.dbflute.bhv.writable;
 
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
The option of update for varying-update.

Parameters:
<CB> The type of condition-bean for specification.
Author(s):
jflute
Since:
0.9.7.2 (2010/06/18 Friday)
 
 public class UpdateOption<CB extends ConditionBeanimplements WritableOption<CB> {
 
     // ===================================================================================
     //                                                                           Attribute
     //                                                                           =========
 
     protected SpecifyQuery<CB> _updateColumnSpecification;
     protected CB _updateColumnSpecifiedCB;
     protected UniqueInfo _uniqueByUniqueInfo;
     protected boolean _exceptCommonColumnForcedSpecified;
     protected boolean _updateColumnModifiedPropertiesFragmentedAllowed// as default of batch update
     protected boolean _compatibleBatchUpdateDefaultEveryColumn;
     protected boolean _disableCommonColumnAutoSetup;
     protected boolean _nonQueryUpdateAllowed;
     protected boolean _queryUpdateForcedDirectAllowed;
     protected Integer _batchLoggingUpdateLimit;
 
     // ===================================================================================
     //                                                                         Constructor
     //                                                                         ===========
     
Constructor.
 Purchase purchase = new Purchase();
 purchase.setPurchaseId(value); // required
 purchase.setOther...(value); // you should set only modified columns
 
 // e.g. you can update by self calculation values
 UpdateOption<PurchaseCB> option = new UpdateOption<PurchaseCB>();
 option.self(new SpecifyQuery<PurchaseCB>() {
     public void specify(PurchaseCB cb) {
         cb.specify().columnPurchaseCount();
     }
 }).plus(1); // PURCHASE_COUNT = PURCHASE_COUNT + 1
 
 // e.g. you can update by your values for common columns
 option.disableCommonColumnAutoSetup();
 
 purchaseBhv.varyingUpdate(purchase, option);
 
    public UpdateOption() {
    }
    // ===================================================================================
    //                                                                    Self Calculation
    //                                                                    ================
    
Specify a self calculation as update value.
You can specify a column except PK column, common column and optimistic-lock column. And you can specify only one column that is a number type.
 Purchase purchase = new Purchase();
 purchase.setPurchaseId(value); // required
 purchase.setOther...(value); // you should set only modified columns
 UpdateOption<PurchaseCB> option = new UpdateOption<PurchaseCB>();
 option.self(new SpecifyQuery<PurchaseCB>() {
     public void specify(PurchaseCB cb) {
         cb.specify().columnPurchaseCount();
     }
 }).plus(1); // PURCHASE_COUNT = PURCHASE_COUNT + 1
 purchaseBhv.varyingUpdateNonstrict(purchase, option);
 

Parameters:
colCBLambda The callback for query for specification that specifies only one column. (NotNull)
Returns:
The calculation of specification for the specified column. (NotNull)
    public ColumnCalculator self(SpecifyQuery<CB> colCBLambda) {
        if (colCBLambda == null) {
            String msg = "The argument 'colCBLambda' should not be null.";
            throw new IllegalArgumentException(msg);
        }
        if ( == null) {
             = DfCollectionUtil.newArrayList();
        }
        final HpCalcSpecification<CB> specification = createCalcSpecification(colCBLambda);
        .add(specification);
        return specification;
    }
    protected HpCalcSpecification<CB> createCalcSpecification(SpecifyQuery<CB> colCBLambda) {
        return newCalcSpecification(colCBLambda);
    }
    protected HpCalcSpecification<CB> newCalcSpecification(SpecifyQuery<CB> colCBLambda) {
        return new HpCalcSpecification<CB>(colCBLambda);
    }
    public boolean hasSelfSpecification() {
        return  != null && !.isEmpty();
    }
    public static interface UpdateSelfSpecificationCBFactory<CB> {
        CB create();
    }
    public void resolveSelfSpecification(UpdateSelfSpecificationCBFactory<CB> factory) {
        if ( == null || .isEmpty()) {
            return;
        }
         = StringKeyMap.createAsFlexibleOrdered();
        for (HpCalcSpecification<CB> specification : ) {
            final CB cb = factory.create(); // needs independent instance per specification 
            specification.specify(cb);
            final String columnDbName = specification.getResolvedSpecifiedColumnDbName();
            assertSpecifiedColumn(cbcolumnDbName);
            .put(columnDbNamespecification);
        }
    }
    protected void assertSpecifiedColumn(CB cbString columnDbName) {
        if (columnDbName == null) {
        }
        final ColumnInfo columnInfo = cb.asDBMeta().findColumnInfo(columnDbName);
        if (columnInfo.isPrimary()) {
            throwVaryingUpdatePrimaryKeySpecificationException(columnInfo);
        }
        if (columnInfo.isCommonColumn()) {
            throwVaryingUpdateCommonColumnSpecificationException(columnInfo);
        }
        if (columnInfo.isOptimisticLock()) {
        }
        if (!columnInfo.isObjectNativeTypeNumber() && !columnInfo.isObjectNativeTypeDate()) {
            // *simple message because other types may be supported at the future
            String msg = "Not number or date column specified: " + columnInfo;
            throw new VaryingUpdateCalculationUnsupportedColumnTypeException(msg);
        }
    }
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("The specified column for varying-update was invalid.");
        br.addItem("Advice");
        br.addElement("You should call specify().column[TargetColumn]() only once.");
        br.addElement("For example:");
        br.addElement("");
        br.addElement("  (x):");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            // *no, empty");
        br.addElement("        }");
        br.addElement("    });");
        br.addElement("  (x):");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            cb.specify().columnPurchaseCount();");
        br.addElement("            cb.specify().columnPurchasePrice(); // *no, duplicated");
        br.addElement("        }");
        br.addElement("    });");
        br.addElement("  (o)");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            cb.specify().columnPurchaseCount(); // OK");
        br.addElement("        }");
        br.addElement("    });");
        br.addItem("Target Table");
        br.addElement(cb.asTableDbName());
        final String msg = br.buildExceptionMessage();
        throw new VaryingUpdateInvalidColumnSpecificationException(msg);
    }
    protected void throwVaryingUpdatePrimaryKeySpecificationException(ColumnInfo columnInfo) {
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("The primary key column was specified.");
        br.addItem("Advice");
        br.addElement("Varying-update is not allowed to specify a PK column.");
        br.addItem("Target Table");
        br.addElement(columnInfo.getDBMeta().getTableDbName());
        br.addItem("Specified Column");
        br.addElement(columnInfo);
        final String msg = br.buildExceptionMessage();
        throw new VaryingUpdatePrimaryKeySpecificationException(msg);
    }
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("The column for optimistic lock was specified.");
        br.addItem("Advice");
        br.addElement("Varying-update is not allowed to specify a optimistic-lock column.");
        br.addItem("Target Table");
        br.addElement(columnInfo.getDBMeta().getTableDbName());
        br.addItem("Specified Column");
        br.addElement(columnInfo);
        final String msg = br.buildExceptionMessage();
        throw new VaryingUpdateCommonColumnSpecificationException(msg);
    }
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("The column for optimistic lock was specified.");
        br.addItem("Advice");
        br.addElement("Varying-update is not allowed to specify a optimistic-lock column.");
        br.addItem("Target Table");
        br.addElement(columnInfo.getDBMeta().getTableDbName());
        br.addItem("Specified Column");
        br.addElement(columnInfo);
        final String msg = br.buildExceptionMessage();
    }
    protected String getSpecifiedColumnDbNameAsOne(CB cb) {
        return cb.getSqlClause().getSpecifiedColumnDbNameAsOne();
    }
    // ===================================================================================
    //                                                                     Build Statement
    //                                                                     ===============
    public boolean hasStatement(String columnDbName) {
        return findStatementSpecification(columnDbName) != null;
    }
    public String buildStatement(String columnDbName) {
        return doBuildStatement(columnDbNamenull);
    }
    public String buildStatement(String columnDbNameString aliasName) {
        return doBuildStatement(columnDbNamealiasName);
    }
    protected String doBuildStatement(String columnDbNameString aliasName) {
        final HpCalcSpecification<CB> calcSp = findStatementSpecification(columnDbName);
        if (calcSp == null) {
            return null;
        }
        final SpecifiedColumn specifiedColumn = calcSp.getResolvedSpecifiedColumn();
        if (specifiedColumn != null && specifiedColumn.hasSpecifyCalculation()) {
            throwVaryingUpdateSpecifyCalculatonUnsupportedException(columnDbName);
        }
        final String statement = calcSp.buildStatementAsSqlName(aliasName);
        if (statement == null) { // means non-calculation
            throwVaryingUpdateNotFoundCalculationException(columnDbName);
        }
        return statement;
    }
    protected HpCalcSpecification<CB> findStatementSpecification(String columnDbName) {
        // only "self" supported yet
        return  != null ? .get(columnDbName) : null;
    }
    protected void throwVaryingUpdateSpecifyCalculatonUnsupportedException(String columnDbName) {
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("VaryingUpdate with SpecifyCalculation is unsupported.");
        br.addItem("Advice");
        br.addElement("For example:");
        br.addElement("  (x):");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            cb.specify().columnPurchaseCount().plus(1); // *NG");
        br.addElement("        }");
        br.addElement("    }).multiply(3);");
        br.addElement("  (o):");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            cb.specify().columnPurchaseCount();");
        br.addElement("        }");
        br.addElement("    }).plus(1).multiply(3); // OK");
        br.addItem("Specified Column");
        br.addElement(columnDbName);
        final String msg = br.buildExceptionMessage();
        throw new IllegalConditionBeanOperationException(msg); // because of specified by ConditionBean
    }
    protected void throwVaryingUpdateNotFoundCalculationException(String columnDbName) {
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("The calculation of specified column for VaryingUpdate was not found.");
        br.addItem("Advice");
        br.addElement("You should call plus()/minus()/... methods after specification.");
        br.addElement("For example:");
        br.addElement("  (x):");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            cb.specify().columnPurchaseCount();");
        br.addElement("        }");
        br.addElement("    }); // *NG");
        br.addElement("  (o):");
        br.addElement("    option.self(new SpecifyQuery<PurchaseCB>() {");
        br.addElement("        public void specify(PurchaseCB cb) {");
        br.addElement("            cb.specify().columnPurchaseCount();");
        br.addElement("        }");
        br.addElement("    }).plus(1); // OK");
        br.addItem("Specified Column");
        br.addElement(columnDbName);
        final String msg = br.buildExceptionMessage();
        throw new VaryingUpdateNotFoundCalculationException(msg);
    }
    // ===================================================================================
    //                                                                       Update Column
    //                                                                       =============
    // -----------------------------------------------------
    //                                        Specify Column
    //                                        --------------
    
Specify update columns manually.
You can update fixed columns instead of modified update columns.
 Member member = new Member();
 member.setMemberId(3);
 member.setOthers...(value);
 UpdateOption<MemberCB> option = new UpdateOption<MemberCB>();
 option.specify(new SpecifyQuery<MemberCB>() {
     public void query(MemberCB cb) {
         // only MemberName and Birthdate are updated
         // with common columns for update and an exclusive control column
         cb.specify().columnMemberName();
         cb.specify().columnBirthdate();
     }
 });
 memberBhv.varyingUpdate(member, option);
 

Parameters:
colCBLambda The callback for query of specifying update columns. (NotNull)
    public void specify(SpecifyQuery<CB> colCBLambda) {
        if (colCBLambda == null) {
            String msg = "The argument 'updateColumnSpecification' should not be null.";
            throw new IllegalArgumentException(msg);
        }
         = colCBLambda;
    }
    public void resolveUpdateColumnSpecification(CB cb) {
        if ( == null) {
            return;
        }
         = cb;
        if (!) {
            xacceptCommonColumnForcedSpecification(cb);
        }
        // an exclusive control column is specified forcedly by behavior's logic
    }
    // -----------------------------------------------------
    //                                         Common Column
    //                                         -------------
    
Except common columns from forced specified update columns.

Returns:
The option of update. (NotNull: returns this)
         = true;
        return this;
    }
    protected void xacceptCommonColumnForcedSpecification(CB cb) { // internal
        final List<ColumnInfobeforeUpdateList = cb.asDBMeta().getCommonColumnInfoBeforeUpdateList();
        if (beforeUpdateList == null || beforeUpdateList.isEmpty()) {
            return;
        }
        for (ColumnInfo columnInfo : beforeUpdateList) {
            addForcedSpecifiedUpdateColumn(columnInfo);
        }
    }
    protected void addForcedSpecifiedUpdateColumn(ColumnInfo columnInfo) {
        if ( == null) {
             = DfCollectionUtil.newHashSet();
        }
    }
    // -----------------------------------------------------
    //                                   Modified Properties
    //                                   -------------------
    // for BatchUpdate
    public void xacceptUpdateColumnModifiedPropertiesIfNeeds(List<? extends EntityentityList) { // internal
        if (entityList == null) {
            throw new IllegalArgumentException("The argument 'entityList' should not be null.");
        }
        if ( != null) {
            return// already specified
        }
        if (entityList.isEmpty()) {
            return// do nothing
        }
            return// every column for compatible
        }
        final Entity firstEntity = entityList.get(0);
        final Set<StringtargetProps = xgatherUpdateColumnModifiedProperties(entityListfirstEntity);
        final DBMeta dbmeta = firstEntity.asDBMeta();
        specify(new SpecifyQuery<CB>() {
            public void specify(CB cb) {
                // you don't need to specify primary key because primary key has special handling
                for (String prop : targetProps) {
                    final ColumnInfo info = dbmeta.findColumnInfo(prop);
                    if (!info.isPrimary()) { // except PK
                        cb.localSp().xspecifyColumn(info.getColumnDbName());
                    }
                }
            }
        });
    }
    public void xallowUpdateColumnModifiedPropertiesFragmented() { // might be called by generator for option
    }
    public void xdisallowUpdateColumnModifiedPropertiesFragmented() { // for back to default
    }
    }
    protected Set<StringxgatherUpdateColumnModifiedProperties(List<? extends EntityentityListEntity firstEntity) {
        // no use for now (same-set columns basis)
        //if (firstEntity.createdBySelect() || ...) { // ...
        if (xisUpdateColumnModifiedPropertiesFragmentedAllowed()) { // least common multiple
            final Set<StringmergedProps = new LinkedHashSet<String>();
            for (Entity entity : entityList) { // for merge
                mergedProps.addAll(entity.mymodifiedProperties());
            }
            return mergedProps;
        } else { // same-set columns (mainly here)
            final Set<StringfirstProps = firstEntity.mymodifiedProperties();
            for (Entity entity : entityList) { // for check
                if (!entity.mymodifiedProperties().equals(firstProps)) {
                    throwBatchUpdateColumnModifiedPropertiesFragmentedException(firstPropsentity);
                }
            }
            return firstProps// use first entity's
        }
    }
    protected void throwBatchUpdateColumnModifiedPropertiesFragmentedException(Set<StringbasePropsEntity entity) {
        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
        br.addNotice("The modified properties in the entity are fragmented as batch update column.");
        br.addItem("Advice");
        br.addElement("You should specify the same-set columns to your entities.");
        br.addElement("For example:");
        br.addElement("");
        br.addElement("  (x): (BatchUpdate)");
        br.addElement("    for (... : ...) {");
        br.addElement("        Member member = new Member();");
        br.addElement("        member.setMemberName(\"foo\");");
        br.addElement("        if (...) { // only a part of entities is set");
        br.addElement("            member.setMemberStatusCode_Formalized();");
        br.addElement("        }");
        br.addElement("        member.setVersionNo(...);");
        br.addElement("        memberList.add(member);");
        br.addElement("    }");
        br.addElement("    memberBhv.batchUpdate(memberList); // throws exception");
        br.addElement("  (o): (BatchUpdate)");
        br.addElement("    for (... : ...) {");
        br.addElement("        Member member = new Member();");
        br.addElement("        member.setMemberName(\"foo\");");
        br.addElement("        if (...) {");
        br.addElement("            member.setMemberStatusCode_Formalized();");
        br.addElement("        } else {");
        br.addElement("            member.setMemberStatusCode_Provisional();");
        br.addElement("        }");
        br.addElement("        member.setVersionNo(...);");
        br.addElement("        memberList.add(member);");
        br.addElement("    }");
        br.addElement("    memberBhv.batchUpdate(memberList); // MEMBER_STATUS_CODE is updated");
        br.addElement("  (o): (EntityUpdate)");
        br.addElement("    for (... : ...) {");
        br.addElement("        Member member = new Member();");
        br.addElement("        member.setMemberName(\"foo\");");
        br.addElement("        if (...) { // only a part of entities is set");
        br.addElement("            member.setMemberStatusCode_Formalized();");
        br.addElement("        }");
        br.addElement("        member.setVersionNo(...);");
        br.addElement("        memberList.add(member);");
        br.addElement("    }");
        br.addElement("    for (Member member : memberList) {");
        br.addElement("        memberBhv.update(member); // keep or update new value of MEMBER_STATUS_CODE");
        br.addElement("    }");
        br.addItem("Update Table");
        br.addElement(entity.asDBMeta().getTableDbName());
        br.addItem("Base Properties");
        br.addElement(baseProps);
        br.addItem("Fragmented Entity");
        br.addElement(entity.asDBMeta().extractPrimaryKeyMap(entity));
        br.addItem("Fragmented Properties");
        br.addElement(entity.mymodifiedProperties());
        final String msg = br.buildExceptionMessage();
    }
    // -----------------------------------------------------
    //                               Compatible UpdateColumn
    //                               -----------------------
    // for BatchUpdate
    }
    public boolean xisCompatibleBatchUpdateDefaultEveryColumn() {
    }
    // -----------------------------------------------------
    //                                        Update Process
    //                                        --------------
    public void xcheckSpecifiedUpdateColumnPrimaryKey() { // checked later by process if it needs
        if ( == null) {
            return;
        }
        final CB cb = ;
        final String basePointAliasName = cb.getSqlClause().getBasePointAliasName();
        final DBMeta dbmeta = cb.asDBMeta();
        if (dbmeta.hasPrimaryKey()) {
            final PrimaryInfo pkInfo = dbmeta.getPrimaryInfo();
            final List<ColumnInfopkList = pkInfo.getPrimaryColumnList();
            for (ColumnInfo pk : pkList) {
                final String columnDbName = pk.getColumnDbName();
                if (cb.getSqlClause().hasSpecifiedSelectColumn(basePointAliasNamecolumnDbName)) {
                    String msg = "PK columns should not be allowed to specify as update columns: " + columnDbName;
                    throw new SpecifyUpdateColumnInvalidException(msg);
                }
            }
        }
    }
    public boolean hasSpecifiedUpdateColumn() {
        return  != null;
    }
    public CB getUpdateColumnSpecifiedCB() { // for various determination
        return // null allowed
    }
    public boolean isSpecifiedUpdateColumn(String columnDbName) {
        if ( != null && .contains(columnDbName)) {
            return true// basically common column
        }
        final SqlClause sqlClause = .getSqlClause();
        return sqlClause.hasSpecifiedSelectColumn(sqlClause.getBasePointAliasName(), columnDbName);
    }
    protected void assertUpdateColumnSpecifiedCB() {
        if ( == null) {
            String msg = "The CB for specification of update columns should be required here.";
            throw new IllegalStateException(msg);
        }
    }
    // ===================================================================================
    //                                                                           Unique By
    //                                                                           =========
    
To be unique by the unique column of the unique info.
The values of the unique columns should be in your entity.
Usually you can use entity's uniqueOf() so this is basically for interface dispatch world.
You can update the entity by the key when entity update (NOT batch update).

Parameters:
uniqueInfo The unique info of DB meta for natural unique. (NotNull, NotPrimary)
    public void uniqueBy(UniqueInfo uniqueInfo) {
        if (uniqueInfo == null) {
            String msg = "The argument 'uniqueInfo' should not be null.";
            throw new IllegalArgumentException(msg);
        }
        if (uniqueInfo.isPrimary()) {
            String msg = "The unique info should be natural unique (not primary): " + uniqueInfo;
            throw new IllegalArgumentException(msg);
        }
         = uniqueInfo;
    }
    public boolean hasUniqueByUniqueInfo() {
        return  != null;
    }
    public UniqueInfo getUniqueByUniqueInfo() {
        return ;
    }
    // ===================================================================================
    //                                                                       Common Column
    //                                                                       =============
    
Disable auto-setup for common columns.
You can update by your values for common columns.
 Member member = new Member();
 member.setMemberId(3);
 member.setOthers...(value);
 member.setUpdateDatetime(updateDatetime);
 member.setUpdateUser(updateUser);
 UpdateOption<MemberCB> option = new UpdateOption<MemberCB>();
 option.disableCommonColumnAutoSetup();
 memberBhv.varyingUpdate(member, option);
 

Returns:
The option of update. (NotNull: returns this)
         = true;
        return this;
    }
    public boolean isCommonColumnAutoSetupDisabled() {
        return ;
    }
    // ===================================================================================
    //                                                                        Query Update
    //                                                                        ============
    
Allow you to non-query-update (means query-update without a query condition).
Normally it is not allowed, so you can do it by this option if you want.

Returns:
The option of update. (NotNull: returns this)
    public UpdateOption<CB> allowNonQueryUpdate() {
         = true;
        return this;
    }
    public boolean isNonQueryUpdateAllowed() {
        return ;
    }

    
Allow you to use direct clause in query update forcedly.

Returns:
The option of update. (NotNull: returns this)
         = true;
        return this;
    }
    public boolean isQueryUpdateForcedDirectAllowed() {
        return ;
    }
    // ===================================================================================
    //                                                                       Batch Logging
    //                                                                       =============
    
Limit batch-update logging by logging size.
For example, if you set 3, only 3 records are logged.
This also works to SqlLogHandler's call-back and SqlResultInfo's displaySql.

Parameters:
batchLoggingUpdateLimit The limit size of batch-update logging. (NullAllowed: if null and minus, means no limit)
    public void limitBatchUpdateLogging(Integer batchLoggingUpdateLimit) {
         = batchLoggingUpdateLimit;
    }
        return ;
    }
    // ===================================================================================
    //                                                                           Configure
    //                                                                           =========
    
Configure statement JDBC options. e.g. queryTimeout, fetchSize, ... (only one-time call)
 memberBhv.varyingUpdate(member, op -> op.configure(conf -> conf.queryTimeout(3)));
 

Parameters:
confLambda The callback for configuration of statement for update. (NotNull)
    public void configure(StatementConfigCall<StatementConfigconfLambda) {
        assertStatementConfigNotDuplicated(confLambda);
         = createStatementConfig(confLambda);
    }
        if ( != null) {
            String msg = "Already registered the configuration: existing=" +  + ", new=" + configCall;
            throw new IllegalConditionBeanOperationException(msg);
        }
    }
        if (configCall == null) {
            throw new IllegalArgumentException("The argument 'confLambda' should not be null.");
        }
        final StatementConfig config = newStatementConfig();
        configCall.callback(config);
        return config;
    }
    protected StatementConfig newStatementConfig() {
        return new StatementConfig();
    }
        return ;
    }
    // ===================================================================================
    //                                                                      Basic Override
    //                                                                      ==============
    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        if ( != null && !.isEmpty()) {
            sb.append("SelfCalculationSpecified");
        }
        if ( != null) {
            if (sb.length() > 0) {
                sb.append(", ");
            }
            sb.append("UpdateColumnSpecified");
        }
        if () {
            if (sb.length() > 0) {
                sb.append(", ");
            }
            sb.append("CommonColumnDisabled");
        }
        if () {
            if (sb.length() > 0) {
                sb.append(", ");
            }
            sb.append("NonQueryUpdateAllowed");
        }
        if ( != null) {
            if (sb.length() > 0) {
                sb.append(", ");
            }
            sb.append("batchLogging(" +  + ")");
        }
        if (sb.length() == 0) {
            sb.append("default");
        }
        return DfTypeUtil.toClassTitle(this) + ":{" + sb.toString() + "}";
    }
New to GrepCode? Check out our FAQ X