${database.allClassCopyright}package ${glPackageBaseCQ};

#set ($myClassName = "${myAbstractBaseConditionQueryClassName}")
import java.util.Collection;

import org.seasar.dbflute.cbean.*;
import org.seasar.dbflute.cbean.chelper.*;
import org.seasar.dbflute.cbean.ckey.*;
import org.seasar.dbflute.cbean.coption.*;
import org.seasar.dbflute.cbean.cvalue.ConditionValue;
import org.seasar.dbflute.cbean.sqlclause.SqlClause;
import org.seasar.dbflute.dbmeta.DBMetaProvider;
import ${glPackageBaseCommon}.*;
import ${glPackageCB}.*;
import ${glPackageCQ}.*;

/**
 * The abstract condition-query of ${table.name}.
 * @author ${database.classAuthor}
 */
public abstract class ${myClassName} extends AbstractConditionQuery {

    // ===================================================================================
    //                                                                         Constructor
    //                                                                         ===========
    public ${myClassName}(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) {
        super(childQuery, sqlClause, aliasName, nestLevel);
    }

    // ===================================================================================
    //                                                                     DBMeta Provider
    //                                                                     ===============
    @Override
    protected DBMetaProvider xgetDBMetaProvider() {
        return ${glDBMetaInstanceHandler}.getProvider();
    }

    // ===================================================================================
    //                                                                          Table Name
    //                                                                          ==========
    public String getTableDbName() {
        return "${table.name}";
    }

    // ===================================================================================
    //                                                                               Query
    //                                                                               =====
#foreach ($col in $table.columns)
#set ($tmpJavaName = "${col.javaName}")
#set ($tmpUncapitalisedJavaName = "${col.uncapitalisedJavaName}")
#set ($fk = $col.foreignKey)
#if (${col.isJavaNativeStringObject()})

    /**
     * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br />
     * ${col.aliasExpression}${col.name}: {${col.columnDefinitionLineDisp}}
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as equal.
     */
    ${col.propertySettingModifier} void set${tmpJavaName}_Equal(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        doSet${tmpJavaName}_Equal(fRES(${tmpUncapitalisedJavaName}));
    }
#if (${col.isAvailableStringEmptyString()})

    /**
     * Equal(=). As the empty-string. And OnlyOnceRegistered.
     */
    ${col.propertySettingModifier} void set${tmpJavaName}_Equal_EmptyString() {
        doSet${tmpJavaName}_Equal("");
    }
#end
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * Equal(=). As ${col.classificationName}. And NullOrEmptyIgnored, OnlyOnceRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdef The instance of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_Equal_As${col.classificationName}(${glCDef}.${col.classificationName} cdef) {
        doSet${tmpJavaName}_Equal(cdef.code());
    }
#foreach ($classificationMap in $col.classificationMapList)

    /**
     * Equal(=). As ${classificationMap.get('name')}. And OnlyOnceRegistered. <br />
     * $database.buildClassificationApplicationComment($classificationMap)
     */
    public void set${tmpJavaName}_Equal_${classificationMap.get('name')}() {
        set${tmpJavaName}_Equal_As${col.classificationName}(${glCDef}.${col.classificationName}.${classificationMap.get('name')});
    }
#end
#end

    protected void doSet${tmpJavaName}_Equal(${col.javaNative} ${tmpUncapitalisedJavaName}) {
#if ($database.isShortCharHandlingValid() && $col.isJdbcTypeChar())
        reg${tmpJavaName}(CK_EQ, hSC("${col.name}", ${tmpUncapitalisedJavaName}, ${col.columnSizeSettingExpression}, "${database.shortCharHandlingModeCode}"));
#else
        reg${tmpJavaName}(CK_EQ, ${tmpUncapitalisedJavaName});
#end
    }
#if (${col.isAvailableStringNotEqual()})

    /**
     * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as notEqual.
     */
    ${col.propertySettingModifier} void set${tmpJavaName}_NotEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        doSet${tmpJavaName}_NotEqual(fRES(${tmpUncapitalisedJavaName}));
    }
#if (${col.isAvailableStringEmptyString()})

    /**
     * NotEqual(&lt;&gt;). As the empty-string. And OnlyOnceRegistered.
     */
    ${col.propertySettingModifier} void set${tmpJavaName}_NotEqual_EmptyString() {
        doSet${tmpJavaName}_NotEqual("");
    }
#end
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * NotEqual(&lt;&gt;). As ${col.classificationName}. And NullOrEmptyIgnored, OnlyOnceRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdef The instance of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_NotEqual_As${col.classificationName}(${glCDef}.${col.classificationName} cdef) {
        doSet${tmpJavaName}_NotEqual(cdef.code());
    }
#foreach ($classificationMap in $col.ClassificationMapList)

    /**
     * NotEqual(&lt;&gt;). As ${classificationMap.get('name')}. And OnlyOnceRegistered. <br />
     * $database.buildClassificationApplicationComment($classificationMap)
     */
    public void set${tmpJavaName}_NotEqual_${classificationMap.get('name')}() {
        set${tmpJavaName}_NotEqual_As${col.classificationName}(${glCDef}.${col.classificationName}.${classificationMap.get('name')});
    }
#end
#end

    protected void doSet${tmpJavaName}_NotEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
#if ($database.isShortCharHandlingValid() && $col.isJdbcTypeChar())
        reg${tmpJavaName}(${database.conditionQueryNotEqualDefinitionName}, hSC("${col.name}", ${tmpUncapitalisedJavaName}, ${col.columnSizeSettingExpression}, "${database.shortCharHandlingModeCode}"));
#else
        reg${tmpJavaName}(${database.conditionQueryNotEqualDefinitionName}, ${tmpUncapitalisedJavaName});
#end
    }
#end
#if (${col.isAvailableStringGreaterThan()})

    /**
     * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as greaterThan.
     */
    public void set${tmpJavaName}_GreaterThan(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_GT, fRES(${tmpUncapitalisedJavaName}));
    }
#end
#if (${col.isAvailableStringLessThan()})

    /**
     * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as lessThan.
     */
    public void set${tmpJavaName}_LessThan($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_LT, fRES(${tmpUncapitalisedJavaName}));
    }
#end
#if (${col.isAvailableStringGreaterEqual()})

    /**
     * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as greaterEqual.
     */
    public void set${tmpJavaName}_GreaterEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_GE, fRES(${tmpUncapitalisedJavaName}));
    }
#end
#if (${col.isAvailableStringLessEqual()})

    /**
     * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as lessEqual.
     */
    public void set${tmpJavaName}_LessEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_LE, fRES(${tmpUncapitalisedJavaName}));
    }
#end
#if (${col.isAvailableStringInScope()})

    /**
     * InScope(in ('a', 'b')). And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as inScope.
     */
    public void set${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        doSet${tmpJavaName}_InScope(${tmpUncapitalisedJavaName}List);
    }
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * InScope(in ('a', 'b')). As ${col.classificationName}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdefList The list of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_InScope_As${col.classificationName}(Collection<${glCDef}.${col.classificationName}> cdefList) {
        doSet${tmpJavaName}_InScope(cTStrL(cdefList));
    }
#end

    public void doSet${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_INS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#if (${col.isAvailableStringNotInScope()})

    /**
     * NotInScope(not in ('a', 'b')). And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as notInScope.
     */
    public void set${tmpJavaName}_NotInScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        doSet${tmpJavaName}_NotInScope(${tmpUncapitalisedJavaName}List);
    }
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * NotInScope(not in ('a', 'b')). As ${col.classificationName}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdefList The list of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_NotInScope_As${col.classificationName}(Collection<${glCDef}.${col.classificationName}> cdefList) {
        doSet${tmpJavaName}_NotInScope(cTStrL(cdefList));
    }
#end

    public void doSet${tmpJavaName}_NotInScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_NINS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#if (${col.isAvailableStringPrefixSearch()})

    /**
     * PrefixSearch(like 'xxx%' escape ...). And NullOrEmptyIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as prefixSearch.
     */
    public void set${tmpJavaName}_PrefixSearch(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        set${tmpJavaName}_LikeSearch(${tmpUncapitalisedJavaName}, cLSOP());
    }
#end
#if (${col.isAvailableStringLikeSearch()})

    /**
     * LikeSearch with various options. (versatile) {like '%xxx%' escape ...} <br />
     * And NullOrEmptyIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as likeSearch.
     * @param likeSearchOption The option of like-search. (NotNull)
     */
    public void set${tmpJavaName}_LikeSearch(${col.javaNative} ${tmpUncapitalisedJavaName}, LikeSearchOption likeSearchOption) {
        regLSQ(CK_LS, fRES(${tmpUncapitalisedJavaName}), getCValue${tmpJavaName}(), "${col.name}", likeSearchOption);
    }
#end
#if (${col.isAvailableStringNotLikeSearch()})

    /**
     * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br />
     * And NullOrEmptyIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as notLikeSearch.
     * @param likeSearchOption The option of not-like-search. (NotNull)
     */
    public void set${tmpJavaName}_NotLikeSearch(${col.javaNative} ${tmpUncapitalisedJavaName}, LikeSearchOption likeSearchOption) {
        regLSQ(CK_NLS, fRES(${tmpUncapitalisedJavaName}), getCValue${tmpJavaName}(), "${col.name}", likeSearchOption);
    }
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#end

    /**
     * Set up ExistsReferrer (co-related sub-query). <br />
     * {exists (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * <pre>
     * cb.query().<span style="color: #FD4747">exists${relationPropertyNameInitCap}</span>(new SubQuery&lt;${relatedCBClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.query().setXxx...
     *     }
     * });
     * </pre>
     * @param subQuery The sub-query of ${relationPropertyNameInitCap} for 'exists'. (NotNull)
     */
    public void exists${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForExistsReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerExistsReferrer(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#end

    /**
     * Set up NotExistsReferrer (co-related sub-query). <br />
     * {not exists (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * <pre>
     * cb.query().<span style="color: #FD4747">notExists${relationPropertyNameInitCap}</span>(new SubQuery&lt;${relatedCBClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.query().setXxx...
     *     }
     * });
     * </pre>
     * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} for 'not exists'. (NotNull)
     */
    public void notExists${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForExistsReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerNotExistsReferrer(cb.query(), "${col.name}", "${referrer.FirstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.isSingleKeyForeignKey()} && !${col.foreignKey.hasFixedCondition()})
#set ($relatedCBClassName = "${fk.foreignTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${fk.foreignTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeRelation_${fk.foreignPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeRelation_${fk.foreignPropertyNameInitCap}")

    /**
     * Set up InScopeRelation (sub-query). <br />
     * {in (select ${fk.firstLocalColumnName} from ${fk.foreignTable.name} where ...)} <br />
     * ${fk.foreignTable.aliasExpression}${fk.foreignTable.name} as '${fk.foreignJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${fk.foreignPropertyNameInitCap} for 'in-scope'. (NotNull)
     */
    public void inScope${fk.foreignPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerInScopeRelation(cb.query(), "${col.name}", "${fk.firstForeignColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeRelation_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeRelation_${referrer.ReferrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeRelation_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeRelation_${referrer.ReferrerPropertyNameInitCap}")
#end

    /**
     * Set up InScopeRelation (sub-query). <br />
     * {in (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${relationPropertyNameInitCap} for 'in-scope'. (NotNull)
     */
    public void inScope${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerInScopeRelation(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.isSingleKeyForeignKey()} && !${col.foreignKey.hasFixedCondition()})
#set ($relatedCBClassName = "${fk.foreignTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${fk.foreignTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotInScopeRelation_${fk.foreignPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotInScopeRelation_${fk.foreignPropertyNameInitCap}")

    /**
     * Set up NotInScopeRelation (sub-query). <br />
     * {not in (select ${col.foreignKey.firstLocalColumnName} from ${fk.foreignTable.name} where ...)} <br />
     * ${fk.foreignTable.aliasExpression}${fk.foreignTable.name} as '${fk.foreignJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${fk.foreignPropertyNameInitCap} for 'not in-scope'. (NotNull)
     */
    public void notInScope${fk.foreignPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerNotInScopeRelation(cb.query(), "${col.name}", "${fk.firstForeignColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotInScopeRelation_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotInScopeRelation_${referrer.ReferrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotInScopeRelation_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotInScopeRelation_${referrer.ReferrerPropertyNameInitCap}")
#end

    /**
     * Set up NotInScopeRelation (sub-query). <br />
     * {not in (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${relationPropertyNameInitCap} for 'not in-scope'. (NotNull)
     */
    public void notInScope${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerNotInScopeRelation(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#if (!${referrer.isOneToOne()})
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_SpecifyDerivedReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_SpecifyDerivedReferrer_${referrer.referrerPropertyNameInitCap}")

    public void xsderive${referrer.referrerPropertyNameInitCap}(String function, SubQuery<${relatedCBClassName}> subQuery, String aliasName, DerivedReferrerOption option) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForDerivedReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerSpecifyDerivedReferrer(function, cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName, aliasName, option);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#if (!${referrer.isOneToOne()})
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_QueryDerivedReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_QueryDerivedReferrer_${referrer.referrerPropertyNameInitCap}")

    /**
     * Prepare for (Query)DerivedReferrer. <br />
     * {FOO &lt;= (select max(BAR) from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * @return The object to set up a function for referrer table. (NotNull)
     */
    public HpQDRFunction<${relatedCBClassName}> derived${referrer.referrerPropertyNameInitCap}() {
        return xcreateQDRFunction${referrer.referrerPropertyNameInitCap}();
    }
    protected HpQDRFunction<${relatedCBClassName}> xcreateQDRFunction${referrer.referrerPropertyNameInitCap}() {
        return new HpQDRFunction<${relatedCBClassName}>(new HpQDRSetupper<${relatedCBClassName}>() {
            public void setup(String function, SubQuery<${relatedCBClassName}> subQuery, String operand, Object value, DerivedReferrerOption option) {
                xqderive${referrer.referrerPropertyNameInitCap}(function, subQuery, operand, value, option);
            }
        });
    }
    public void xqderive${referrer.referrerPropertyNameInitCap}(String function, SubQuery<${relatedCBClassName}> subQuery, String operand, Object value, DerivedReferrerOption option) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForDerivedReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        String parameterPropertyName = keep${subQueryPropertyNameInitCap}Parameter(value);
        registerQueryDerivedReferrer(function, cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName, operand, value, parameterPropertyName, option);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
    public abstract String keep${subQueryPropertyNameInitCap}Parameter(Object parameterValue);
#end
#end
#end
#end
#if (${col.isJavaNativeNumberObject()})
    
    /**
     * Equal(=). And NullIgnored, OnlyOnceRegistered. <br />
     * ${col.aliasExpression}${col.name}: {${col.columnDefinitionLineDisp}}
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as equal.
     */
    ${col.propertySettingModifier} void set${tmpJavaName}_Equal(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        doSet${tmpJavaName}_Equal(${tmpUncapitalisedJavaName});
    }
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * Equal(=). As ${col.classificationName}. And NullIgnored, OnlyOnceRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdef The instance of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_Equal_As${col.classificationName}(${glCDef}.${col.classificationName} cdef) {
        doSet${tmpJavaName}_Equal(cTNum(cdef.code(), ${col.javaNative}.class));
    }
#foreach ($classificationMap in $col.classificationMapList)

    /**
     * Equal(=). As ${classificationMap.get('name')}. And NullIgnored, OnlyOnceRegistered. <br />
     * $database.buildClassificationApplicationComment($classificationMap)
     */
    public void set${tmpJavaName}_Equal_${classificationMap.get('name')}() {
        set${tmpJavaName}_Equal_As${col.classificationName}(${glCDef}.${col.classificationName}.${classificationMap.get('name')});
    }
#end
#end

    protected void doSet${tmpJavaName}_Equal(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_EQ, ${tmpUncapitalisedJavaName});
    }
#if (${col.isAvailableNumberNotEqual()})

    /**
     * NotEqual(&lt;&gt;). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as notEqual.
     */
    ${col.propertySettingModifier} void set${tmpJavaName}_NotEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        doSet${tmpJavaName}_NotEqual(${tmpUncapitalisedJavaName});
    }
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * NotEqual(&lt;&gt;). As ${col.classificationName}. And NullIgnored, OnlyOnceRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdef The instance of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_NotEqual_As${col.classificationName}(${glCDef}.${col.classificationName} cdef) {
        doSet${tmpJavaName}_NotEqual(cTNum(cdef.code(), ${col.javaNative}.class));
    }
#foreach ($classificationMap in $col.classificationMapList)

    /**
     * NotEqual(&lt;&gt;). As ${classificationMap.get('name')}. And NullIgnored, OnlyOnceRegistered. <br />
     * $database.buildClassificationApplicationComment($classificationMap)
     */
    public void set${tmpJavaName}_NotEqual_${classificationMap.get('name')}() {
        set${tmpJavaName}_NotEqual_As${col.classificationName}(${glCDef}.${col.classificationName}.${classificationMap.get('name')});
    }
#end
#end

    protected void doSet${tmpJavaName}_NotEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(${database.conditionQueryNotEqualDefinitionName}, ${tmpUncapitalisedJavaName});
    }
#end
#if (${col.isAvailableNumberGreaterThan()})

    /**
     * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as greaterThan.
     */
    public void set${tmpJavaName}_GreaterThan(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_GT, ${tmpUncapitalisedJavaName});
    }
#end
#if (${col.isAvailableNumberLessThan()})

    /**
     * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as lessThan.
     */
    public void set${tmpJavaName}_LessThan(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_LT, ${tmpUncapitalisedJavaName});
    }
#end
#if (${col.isAvailableNumberGreaterEqual()})

    /**
     * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as greaterEqual.
     */
    public void set${tmpJavaName}_GreaterEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_GE, ${tmpUncapitalisedJavaName});
    }
#end
#if (${col.isAvailableNumberLessEqual()})

    /**
     * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as lessEqual.
     */
    public void set${tmpJavaName}_LessEqual(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_LE, ${tmpUncapitalisedJavaName});
    }
#end
#if (${col.isAvailableNumberInScope()})

    /**
     * InScope(in (1, 2)). And NullIgnored, NullElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as inScope.
     */
    public void set${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        doSet${tmpJavaName}_InScope(${tmpUncapitalisedJavaName}List);
    }
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * InScope(in (1, 2)). As ${col.classificationName}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdefList The list of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_InScope_As${col.classificationName}(Collection<${glCDef}.${col.classificationName}> cdefList) {
        doSet${tmpJavaName}_InScope(cTNumL(cdefList, ${col.javaNative}.class));
    }
#end

    protected void doSet${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_INS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#if (${col.isAvailableNumberNotInScope()})

    /**
     * NotInScope(not in (1, 2)). And NullIgnored, NullElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as notInScope.
     */
    public void set${tmpJavaName}_NotInScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        doSet${tmpJavaName}_NotInScope(${tmpUncapitalisedJavaName}List);
    }
#if ($col.hasClassification())
#set ($existTop = false)
#if ($database.classificationTopDefinitionMap.containsKey($col.classificationName))
#set ($classificationTopMap = $database.classificationTopDefinitionMap.get($col.classificationName))
#set ($existTop = true)
#end

    /**
     * NotInScope(not in (1, 2)). As ${col.classificationName}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br />
#if ($existTop && $classificationTopMap.containsKey('topComment'))
     * $classificationTopMap.get('topComment')
#end
     * @param cdefList The list of classification definition (as ENUM type).
     */
    public void set${tmpJavaName}_NotInScope_As${col.classificationName}(Collection<${glCDef}.${col.classificationName}> cdefList) {
        doSet${tmpJavaName}_NotInScope(cTNumL(cdefList, ${col.javaNative}.class));
    }
#end

    protected void doSet${tmpJavaName}_NotInScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_NINS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#end

    /**
     * Set up ExistsReferrer (co-related sub-query). <br />
     * {exists (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * <pre>
     * cb.query().<span style="color: #FD4747">exists${relationPropertyNameInitCap}</span>(new SubQuery&lt;${relatedCBClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.query().setXxx...
     *     }
     * });
     * </pre>
     * @param subQuery The sub-query of ${relationPropertyNameInitCap} for 'exists'. (NotNull)
     */
    public void exists${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForExistsReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerExistsReferrer(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotExistsReferrer_${referrer.referrerPropertyNameInitCap}")
#end

    /**
     * Set up NotExistsReferrer (co-related sub-query). <br />
     * {not exists (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * <pre>
     * cb.query().<span style="color: #FD4747">notExists${relationPropertyNameInitCap}</span>(new SubQuery&lt;${relatedCBClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.query().setXxx...
     *     }
     * });
     * </pre>
     * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} for 'not exists'. (NotNull)
     */
    public void notExists${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForExistsReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerNotExistsReferrer(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.isSingleKeyForeignKey()} && !${col.foreignKey.hasFixedCondition()})
#set ($relatedCBClassName = "${fk.foreignTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${fk.foreignTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeRelation_${fk.foreignPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeRelation_${fk.foreignPropertyNameInitCap}")

    /**
     * Set up InScopeRelation (sub-query). <br />
     * {in (select ${fk.firstLocalColumnName} from ${fk.foreignTable.name} where ...)} <br />
     * ${fk.foreignTable.aliasExpression}${fk.foreignTable.name} as '${fk.foreignJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${fk.foreignPropertyNameInitCap} for 'in-scope'. (NotNull)
     */
    public void inScope${fk.foreignPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerInScopeRelation(cb.query(), "${col.name}", "${fk.firstForeignColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeRelation_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeRelation_${referrer.ReferrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeRelation_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeRelation_${referrer.ReferrerPropertyNameInitCap}")
#end

    /**
     * Set up InScopeRelation (sub-query). <br />
     * {in (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${relationPropertyNameInitCap} for 'in-scope'. (NotNull)
     */
    public void inScope${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerInScopeRelation(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.isSingleKeyForeignKey()} && !${col.foreignKey.hasFixedCondition()})
#set ($relatedCBClassName = "${fk.foreignTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${fk.foreignTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotInScopeRelation_${fk.foreignPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotInScopeRelation_${fk.foreignPropertyNameInitCap}")

    /**
     * Set up NotInScopeRelation (sub-query). <br />
     * {not in (select ${col.foreignKey.firstLocalColumnName} from ${fk.foreignTable.name} where ...)} <br />
     * ${fk.foreignTable.aliasExpression}${fk.foreignTable.name} as '${fk.foreignJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${fk.foreignPropertyNameInitCap} for 'not in-scope'. (NotNull)
     */
    public void notInScope${fk.foreignPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerNotInScopeRelation(cb.query(), "${col.name}", "${col.foreignKey.firstForeignColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#if (${referrer.isOneToOne()})
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotInScopeRelation_${referrer.referrerPropertyNameInitCapAsOne}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotInScopeRelation_${referrer.ReferrerPropertyNameInitCapAsOne}")
#else
#set ($relationPropertyNameInitCap = "${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_NotInScopeRelation_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_NotInScopeRelation_${referrer.ReferrerPropertyNameInitCap}")
#end

    /**
     * Set up NotInScopeRelation (sub-query). <br />
     * {not in (select ${referrer.firstLocalColumnName} from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * @param subQuery The sub-query of ${relationPropertyNameInitCap} for 'not in-scope'. (NotNull)
     */
    public void notInScope${relationPropertyNameInitCap}(SubQuery<${relatedCBClassName}> subQuery) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerNotInScopeRelation(cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#if (!${referrer.isOneToOne()})
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_SpecifyDerivedReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_SpecifyDerivedReferrer_${referrer.referrerPropertyNameInitCap}")

    public void xsderive${referrer.referrerPropertyNameInitCap}(String function, SubQuery<${relatedCBClassName}> subQuery, String aliasName, DerivedReferrerOption option) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForDerivedReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        registerSpecifyDerivedReferrer(function, cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName, aliasName, option);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
#end
#end
#end
#if (${col.hasSingleKeyReferrer()})
#foreach ($referrer in $col.singleKeyReferrers)
#if (!${referrer.isOneToOne()})
#set ($relatedCBClassName = "${referrer.referrerTableExtendedConditionBeanClassName}")
#set ($relatedCQClassName = "${referrer.referrerTableExtendedConditionQueryClassName}")
#set ($subQueryPropertyNameInitCap = "${tmpJavaName}_QueryDerivedReferrer_${referrer.referrerPropertyNameInitCap}")
#set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_QueryDerivedReferrer_${referrer.referrerPropertyNameInitCap}")

    /**
     * Prepare for (Query)DerivedReferrer. <br />
     * {FOO &lt;= (select max(BAR) from ${referrer.table.name} where ...)} <br />
     * ${referrer.table.aliasExpression}${referrer.table.name} as '${referrer.referrerJavaBeansRulePropertyName}'.
     * @return The object to set up a function for referrer table. (NotNull)
     */
    public HpQDRFunction<${relatedCBClassName}> derived${referrer.referrerPropertyNameInitCap}() {
        return xcreateQDRFunction${referrer.referrerPropertyNameInitCap}();
    }
    protected HpQDRFunction<${relatedCBClassName}> xcreateQDRFunction${referrer.referrerPropertyNameInitCap}() {
        return new HpQDRFunction<${relatedCBClassName}>(new HpQDRSetupper<${relatedCBClassName}>() {
            public void setup(String function, SubQuery<${relatedCBClassName}> subQuery, String operand, Object value, DerivedReferrerOption option) {
                xqderive${referrer.referrerPropertyNameInitCap}(function, subQuery, operand, value, option);
            }
        });
    }
    public void xqderive${referrer.referrerPropertyNameInitCap}(String function, SubQuery<${relatedCBClassName}> subQuery, String operand, Object value, DerivedReferrerOption option) {
        assertObjectNotNull("subQuery<${relatedCBClassName}>", subQuery);
        ${relatedCBClassName} cb = new ${relatedCBClassName}(); cb.xsetupForDerivedReferrer(this); subQuery.query(cb);
        String subQueryPropertyName = keep${subQueryPropertyNameInitCap}(cb.query()); // for saving query-value.
        String parameterPropertyName = keep${subQueryPropertyNameInitCap}Parameter(value);
        registerQueryDerivedReferrer(function, cb.query(), "${col.name}", "${referrer.firstLocalColumnName}", subQueryPropertyName, operand, value, parameterPropertyName, option);
    }
    public abstract String keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery);
    public abstract String keep${subQueryPropertyNameInitCap}Parameter(Object parameterValue);
#end
#end
#end
#end
#if (${col.isJavaNativeDateObject()})
    
    /**
     * Equal(=). And NullIgnored, OnlyOnceRegistered. <br />
     * ${col.aliasExpression}${col.name}: {${col.columnDefinitionLineDisp}}
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as equal.
     */
    public void set${tmpJavaName}_Equal($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_EQ, #if ($col.isJavaNativeUtilDate()) fCTPD(${tmpUncapitalisedJavaName})#else ${tmpUncapitalisedJavaName}#end);
    }
#if (${col.isAvailableDateNotEqual()})

    /**
     * NotEqual(&lt;&gt;). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as notEqual.
     */
    public void set${tmpJavaName}_NotEqual($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(${database.conditionQueryNotEqualDefinitionName}, #if ($col.isJavaNativeUtilDate()) fCTPD(${tmpUncapitalisedJavaName})#else ${tmpUncapitalisedJavaName}#end);
    }
#end
#if (${col.isAvailableDateGreaterThan()})

    /**
     * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as greaterThan.
     */
    public void set${tmpJavaName}_GreaterThan($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_GT, #if ($col.isJavaNativeUtilDate()) fCTPD(${tmpUncapitalisedJavaName})#else ${tmpUncapitalisedJavaName}#end);
    }
#end
#if (${col.isAvailableDateLessThan()})

    /**
     * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as lessThan.
     */
    public void set${tmpJavaName}_LessThan($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_LT, #if ($col.isJavaNativeUtilDate()) fCTPD(${tmpUncapitalisedJavaName})#else ${tmpUncapitalisedJavaName}#end);
    }
#end
#if (${col.isAvailableDateGreaterEqual()})

    /**
     * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as greaterEqual.
     */
    public void set${tmpJavaName}_GreaterEqual($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_GE, #if ($col.isJavaNativeUtilDate()) fCTPD(${tmpUncapitalisedJavaName})#else ${tmpUncapitalisedJavaName}#end);
    }
#end
#if (${col.isAvailableDateLessEqual()})

    /**
     * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered.
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as lessEqual.
     */
    public void set${tmpJavaName}_LessEqual($col.javaNative ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_LE,#if ($col.isJavaNativeUtilDate()) fCTPD(${tmpUncapitalisedJavaName})#else ${tmpUncapitalisedJavaName}#end);
    }
#end
#if (${col.isAvailableDateFromTo()})

    /**
     * FromTo with various options. (versatile) <br />
     * {(default) fromDatetime &lt;= column &lt;= toDatetime} <br />
     * And NullIgnored, OnlyOnceRegistered.
     * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of ${col.uncapitalisedJavaName}. (Nullable)
     * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of ${col.uncapitalisedJavaName}. (Nullable)
     * @param fromToOption The option of from-to. (NotNull)
     */
    public void set${tmpJavaName}_FromTo(java.util.Date fromDatetime, java.util.Date toDatetime, FromToOption fromToOption) {
#if ($col.isJavaNativeUtilDate())
        regFTQ(fCTPD(fromDatetime), fCTPD(toDatetime), getCValue${tmpJavaName}(), "${col.name}", fromToOption);
#else
        regFTQ((fromDatetime != null ? new ${col.javaNative}(fromDatetime.getTime()) : null), (toDatetime != null ? new ${col.javaNative}(toDatetime.getTime()) : null), getCValue${tmpJavaName}(), "${col.name}", fromToOption);
#end
    }
#end
#if (${col.isAvailableDateDateFromTo()})

    /**
     * DateFromTo. (Date means yyyy/MM/dd) <br />
     * {fromDate &lt;= column &lt; toDate + 1 day} <br />
     * And NullIgnored, OnlyOnceRegistered.
     * <pre>
     * ex) from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29}
     *     --&gt; column &gt;= '2007/04/10 00:00:00'
     *     and column <span style="color: #FD4747">&lt; '2007/04/17 00:00:00'</span>
     * </pre>
     * @param fromDate The from-date(yyyy/MM/dd) of ${col.uncapitalisedJavaName}. (Nullable)
     * @param toDate The to-date(yyyy/MM/dd) of ${col.uncapitalisedJavaName}. (Nullable)
     */
    public void set${tmpJavaName}_DateFromTo(java.util.Date fromDate, java.util.Date toDate) {
        set${tmpJavaName}_FromTo(fromDate, toDate, new DateFromToOption());
    }
#end
#if (${col.isAvailableDateInScope()})

    /**
     * InScope(in ('1965-03-03', '1966-09-15')). And NullIgnored, NullElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as inScope.
     */
    public void set${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        doSet${tmpJavaName}_InScope(${tmpUncapitalisedJavaName}List);
    }

    protected void doSet${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_INS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#if (${col.isAvailableDateNotInScope()})

    /**
     * NotInScope(not in ('1965-03-03', '1966-09-15')). And NullIgnored, NullElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as notInScope.
     */
    public void set${tmpJavaName}_NotInScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        doSet${tmpJavaName}_NotInScope(${tmpUncapitalisedJavaName}List);
    }

    protected void doSet${tmpJavaName}_NotInScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_NINS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#end
#if (${col.isJavaNativeBooleanObject()})

    /**
     * Equal(=). And NullIgnored, OnlyOnceRegistered. <br />
     * ${col.aliasExpression}${col.name}: {${col.columnDefinitionLineDisp}}
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as equal.
     */
    public void set${tmpJavaName}_Equal(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_EQ, ${tmpUncapitalisedJavaName});
    }
#if ($col.hasClassification())
#foreach ($classificationMap in $col.classificationMapList)

    /**
     * Equal(=). As ${classificationMap.get('name')}. And OnlyOnceRegistered. <br />
     * $database.buildClassificationApplicationComment($classificationMap)
     */
    public void set${tmpJavaName}_Equal_${classificationMap.get('name')}() {
        reg${tmpJavaName}(CK_EQ, ${col.javaNative}.valueOf(${glCDef}.${col.classificationName}.${classificationMap.get('name')}.code()));
    }
#end
#end
#end
#if (${col.isJavaNativeUUIDObject()})

    /**
     * Equal(=). And NullIgnored, OnlyOnceRegistered. <br />
     * ${col.aliasExpression}${col.name}: {${col.columnDefinitionLineDisp}}
     * @param ${tmpUncapitalisedJavaName} The value of ${col.uncapitalisedJavaName} as equal.
     */
    public void set${tmpJavaName}_Equal(${col.javaNative} ${tmpUncapitalisedJavaName}) {
        reg${tmpJavaName}(CK_EQ, ${tmpUncapitalisedJavaName});
    }
#if (${col.isAvailableStringInScope()})

    /**
     * InScope(in ('a', 'b')). And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered.
     * @param ${tmpUncapitalisedJavaName}List The collection of ${col.uncapitalisedJavaName} as inScope.
     */
    public void set${tmpJavaName}_InScope(Collection<${col.javaNative}> ${tmpUncapitalisedJavaName}List) {
        regINS(CK_INS, cTL(${tmpUncapitalisedJavaName}List), getCValue${tmpJavaName}(), "${col.name}");
    }
#end
#end
#if (!${col.isNotNull()} || ${col.isPrimaryKey()})

    /**
     * IsNull(is null). And OnlyOnceRegistered.
     */
    public void set${tmpJavaName}_IsNull() { reg${tmpJavaName}(CK_ISN, DOBJ); }

    /**
     * IsNotNull(is not null). And OnlyOnceRegistered.
     */
    public void set${tmpJavaName}_IsNotNull() { reg${tmpJavaName}(CK_ISNN, DOBJ); }
#end

    protected void reg${tmpJavaName}(ConditionKey k, Object v) { regQ(k, v, getCValue${tmpJavaName}(), "${col.name}"); }
    abstract protected ConditionValue getCValue${tmpJavaName}();
#end
#if ($table.hasSinglePrimaryKey())

    // ===================================================================================
    //                                                                    Scalar Condition
    //                                                                    ================
    /**
     * Prepare ScalarCondition as equal. <br />
     * {where FOO = (select max(BAR) from ...)
     * <pre>
     * cb.query().<span style="color: #FD4747">scalar_Equal()</span>.max(new SubQuery&lt;${myConditionBeanClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.specify().setXxx... <span style="color: #3F7E5E">// derived column for function</span>
     *         subCB.query().setYyy...
     *     }
     * });
     * </pre>
     * @return The object to set up a function. (NotNull)
     */
    public HpSSQFunction<${myConditionBeanClassName}> scalar_Equal() {
        return xcreateSSQFunction(CK_EQ.getOperand());
    }

    /**
     * Prepare ScalarCondition as equal. <br />
     * {where FOO &lt;&gt; (select max(BAR) from ...)
     * <pre>
     * cb.query().<span style="color: #FD4747">scalar_NotEqual()</span>.max(new SubQuery&lt;${myConditionBeanClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.specify().setXxx... <span style="color: #3F7E5E">// derived column for function</span>
     *         subCB.query().setYyy...
     *     }
     * });
     * </pre>
     * @return The object to set up a function. (NotNull)
     */
    public HpSSQFunction<${myConditionBeanClassName}> scalar_NotEqual() {
        return xcreateSSQFunction(CK_NES.getOperand());
    }

    /**
     * Prepare ScalarCondition as greaterThan. <br />
     * {where FOO &gt; (select max(BAR) from ...)
     * <pre>
     * cb.query().<span style="color: #FD4747">scalar_GreaterThan()</span>.max(new SubQuery&lt;${myConditionBeanClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
     *         subCB.query().setBar...
     *     }
     * });
     * </pre>
     * @return The object to set up a function. (NotNull)
     */
    public HpSSQFunction<${myConditionBeanClassName}> scalar_GreaterThan() {
        return xcreateSSQFunction(CK_GT.getOperand());
    }

    /**
     * Prepare ScalarCondition as lessThan. <br />
     * {where FOO &lt; (select max(BAR) from ...)
     * <pre>
     * cb.query().<span style="color: #FD4747">scalar_LessThan()</span>.max(new SubQuery&lt;${myConditionBeanClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
     *         subCB.query().setBar...
     *     }
     * });
     * </pre>
     * @return The object to set up a function. (NotNull)
     */
    public HpSSQFunction<${myConditionBeanClassName}> scalar_LessThan() {
        return xcreateSSQFunction(CK_LT.getOperand());
    }

    /**
     * Prepare ScalarCondition as greaterEqual. <br />
     * {where FOO &gt;= (select max(BAR) from ...)
     * <pre>
     * cb.query().<span style="color: #FD4747">scalar_GreaterEqual()</span>.max(new SubQuery&lt;${myConditionBeanClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
     *         subCB.query().setBar...
     *     }
     * });
     * </pre>
     * @return The object to set up a function. (NotNull)
     */
    public HpSSQFunction<${myConditionBeanClassName}> scalar_GreaterEqual() {
        return xcreateSSQFunction(CK_GE.getOperand());
    }

    /**
     * Prepare ScalarCondition as lessEqual. <br />
     * {where FOO &lt;= (select max(BAR) from ...)
     * <pre>
     * cb.query().<span style="color: #FD4747">scalar_LessEqual()</span>.max(new SubQuery&lt;${myConditionBeanClassName}&gt;() {
     *     public void query(${myConditionBeanClassName} subCB) {
     *         subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
     *         subCB.query().setBar...
     *     }
     * });
     * </pre>
     * @return The object to set up a function. (NotNull)
     */
    public HpSSQFunction<${myConditionBeanClassName}> scalar_LessEqual() {
        return xcreateSSQFunction(CK_LE.getOperand());
    }

    protected HpSSQFunction<${myConditionBeanClassName}> xcreateSSQFunction(final String operand) {
        return new HpSSQFunction<${myConditionBeanClassName}>(new HpSSQSetupper<${myConditionBeanClassName}>() {
            public void setup(String function, SubQuery<${myConditionBeanClassName}> subQuery) {
                xscalarCondition(function, subQuery, operand);
            }
        });
    }

    protected void xscalarCondition(String function, SubQuery<${myConditionBeanClassName}> subQuery, String operand) {
        assertObjectNotNull("subQuery<${myConditionBeanClassName}>", subQuery);
        ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}(); cb.xsetupForScalarCondition(this); subQuery.query(cb);
        String subQueryPropertyName = keepScalarCondition(cb.query()); // for saving query-value.
        registerScalarCondition(function, cb.query(), subQueryPropertyName, operand);
    }
    public abstract String keepScalarCondition(${myConditionQueryClassName} subQuery);

    // ===================================================================================
    //                                                                      Myself InScope
    //                                                                      ==============
    /**
     * Myself InScope (SubQuery). {mainly for CLOB and Union}
     * @param subQuery The implementation of sub query. (NotNull)
     */
    public void myselfInScope(SubQuery<${myConditionBeanClassName}> subQuery) {
        assertObjectNotNull("subQuery<${myConditionBeanClassName}>", subQuery);
        ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}(); cb.xsetupForInScopeRelation(this); subQuery.query(cb);
        String subQueryPropertyName = keepMyselfInScopeRelation(cb.query()); // for saving query-value.
        registerInScopeRelation(cb.query(), "${table.primaryKeyAsOne.name}", "${table.primaryKeyAsOne.name}", subQueryPropertyName);
    }
    public abstract String keepMyselfInScopeRelation(${myConditionQueryClassName} subQuery);
#end
#if ($database.isAvailableDatabaseDependency())
#if ($database.isDatabaseMySQL())

    // ===================================================================================
    //                                                                    Full Text Search
    //                                                                    ================
    /**
     * Match for full-text search. <br />
     * Bind variable is unused because the condition value should be literal in MySQL.
     * @param textColumn The text column. (NotNull, StringColumn, TargetTableColumn)
     * @param conditionValue The condition value. (Nullable: If the value is null or empty, it does not make condition!)
     * @param modifier The modifier of full-text search. (Nullable: If the value is null, No modifier specified)
     */
    public void match(org.seasar.dbflute.dbmeta.info.ColumnInfo textColumn
                    , String conditionValue
                    , org.seasar.dbflute.dbway.WayOfMySQL.FullTextSearchModifier modifier) {
        assertObjectNotNull("textColumn", textColumn);
        match(newArrayList(textColumn), conditionValue, modifier);
    }

    /**
     * Match for full-text search. <br />
     * Bind variable is unused because the condition value should be literal in MySQL.
     * @param textColumnList The list of text column. (NotNull, NotEmpty, StringColumn, TargetTableColumn)
     * @param conditionValue The condition value. (Nullable: If the value is null or empty, it does not make condition!)
     * @param modifier The modifier of full-text search. (Nullable: If the value is null, No modifier specified)
     */
    public void match(java.util.List<org.seasar.dbflute.dbmeta.info.ColumnInfo> textColumnList
                    , String conditionValue
                    , org.seasar.dbflute.dbway.WayOfMySQL.FullTextSearchModifier modifier) {
        xdoMatchForMySQL(textColumnList, conditionValue, modifier);
    }
#end
#if ($database.isDatabasePostgreSQL())

    // ===================================================================================
    //                                                                    Full Text Search
    //                                                                    ================
    /**
     * Match for full-text search. <br />
     * @param textColumn The text column. (NotNull, StringColumn, TargetTableColumn)
     * @param conditionValue The condition value. (Nullable: If the value is null or empty, it does not make condition!)
     */
    public void match(org.seasar.dbflute.dbmeta.info.ColumnInfo textColumn, String conditionValue) {
        assertObjectNotNull("textColumn", textColumn);
        match(newArrayList(textColumn), conditionValue);
    }

    /**
     * Match for full-text search. <br />
     * @param textColumnList The list of text column. (NotNull, NotEmpty, StringColumn, TargetTableColumn)
     * @param conditionValue The condition value. (Nullable: If the value is null or empty, it does not make condition!)
     */
    public void match(java.util.List<org.seasar.dbflute.dbmeta.info.ColumnInfo> textColumnList, String conditionValue) {
        xdoMatchByLikeSearch(textColumnList, conditionValue);
    }

    @Override
    protected String xescapeFullTextSearchValue(String conditionValue) {
        return conditionValue; // non escape
    }

    @Override
    protected LikeSearchOption xcreateMatchLikeSearch() {
        return new PostgreSQLMatchLikeSearch();
    }

    @Override
    protected org.seasar.dbflute.dbway.ExtensionOperand xgetPostgreSQLMatchOperand() {
        return ${glDBFluteConfig}.getInstance().getFullTextSearchOperand();
    }
#end
#if ($database.isDatabaseOracle())

    // ===================================================================================
    //                                                                    Full Text Search
    //                                                                    ================
    /**
     * Match for full-text search. <br />
     * @param textColumn The text column. (NotNull, StringColumn, TargetTableColumn)
     * @param conditionValue The condition value. (Nullable: If the value is null or empty, it does not make condition!)
     */
    public void match(org.seasar.dbflute.dbmeta.info.ColumnInfo textColumn, String conditionValue) {
        assertObjectNotNull("textColumn", textColumn);
        match(newArrayList(textColumn), conditionValue);
    }

    /**
     * Match for full-text search. <br />
     * The specified condition value is escaped in this method automatically.
     * @param textColumnList The list of text column. (NotNull, NotEmpty, StringColumn, TargetTableColumn)
     * @param conditionValue The condition value. (Nullable: If the value is null or empty, it does not make condition!)
     */
    public void match(java.util.List<org.seasar.dbflute.dbmeta.info.ColumnInfo> textColumnList, String conditionValue) {
        xdoMatchByLikeSearch(textColumnList, conditionValue);
    }

    @Override
    protected String xescapeFullTextSearchValue(String conditionValue) {
        return xescapeOracleFullTextSearchValue(conditionValue);
    }

    @Override
    protected LikeSearchOption xcreateMatchLikeSearch() {
        return new OracleMatchLikeSearch();
    }
#end
#end

    // ===================================================================================
    //                                                                       Very Internal
    //                                                                       =============
    // very internal (for suppressing warn about 'Not Use Import')
    protected String xabCB() { return ${myConditionBeanClassName}.class.getName(); }
    protected String xabCQ() { return ${myConditionQueryClassName}.class.getName(); }
    protected String xabLSO() { return LikeSearchOption.class.getName(); }
    protected String xabSSQS() { return HpSSQSetupper.class.getName(); }
#if ($database.isDatabaseMSAccess())
    @Override
    protected boolean xsuppressEscape() { return true; } // bacause MS-Access does not support escape
#end
}
