Search in sources :

Example 21 with DfLittleAdjustmentProperties

use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.

the class DfSql2EntityTask method setupControlTemplate.

protected void setupControlTemplate() {
    final DfLittleAdjustmentProperties littleProp = getLittleAdjustmentProperties();
    final String title;
    final String controlPath;
    if (littleProp.isAlternateSql2EntityControlValid()) {
        title = "alternate control";
        controlPath = littleProp.getAlternateSql2EntityControl();
    } else {
        final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
        title = lang.getLanguageTitle();
        controlPath = lang.getSql2EntityControl();
    }
    _log.info("");
    _log.info("...Using " + title + " control: " + controlPath);
    setControlTemplate(controlPath);
}
Also used : DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties) DfLanguageDependency(org.dbflute.logic.generate.language.DfLanguageDependency)

Example 22 with DfLittleAdjustmentProperties

use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.

the class DfClsTopLiteralArranger method isElementMapSuppressDBAccessClass.

@SuppressWarnings("unchecked")
protected boolean isElementMapSuppressDBAccessClass(Map<?, ?> elementMap) {
    final String key = DfClassificationTop.KEY_SUPPRESS_DBACCESS_CLASS;
    final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
    final boolean defaultValue = prop.isSuppressTableClassificationDBAccessClass();
    return isProperty(key, defaultValue, (Map<String, ? extends Object>) elementMap);
}
Also used : DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Example 23 with DfLittleAdjustmentProperties

use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.

the class DfClsTopLiteralArranger method getElementMapUndefinedHandlingType.

@SuppressWarnings("unchecked")
protected ClassificationUndefinedHandlingType getElementMapUndefinedHandlingType(Map<?, ?> elementMap) {
    if (isElementMapCheckImplicitSet(elementMap)) {
        return ClassificationUndefinedHandlingType.EXCEPTION;
    }
    final String key = DfClassificationTop.KEY_UNDEFINED_HANDLING_TYPE;
    final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
    final ClassificationUndefinedHandlingType defaultType = prop.getClassificationUndefinedHandlingType();
    final String defaultValue = defaultType.code();
    final String code = getProperty(key, defaultValue, (Map<String, ? extends Object>) elementMap);
    final ClassificationUndefinedHandlingType handlingType = ClassificationUndefinedHandlingType.codeOf(code);
    if (handlingType == null) {
        throwUnknownClassificationUndefinedCodeHandlingTypeException(code);
    }
    return handlingType;
}
Also used : ClassificationUndefinedHandlingType(org.dbflute.jdbc.ClassificationUndefinedHandlingType) DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Example 24 with DfLittleAdjustmentProperties

use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.

the class DfClsTopLiteralArranger method isElementMapSuppressNameCamelizing.

@SuppressWarnings("unchecked")
protected boolean isElementMapSuppressNameCamelizing(Map<?, ?> elementMap) {
    final String key = DfClassificationTop.KEY_SUPPRESS_NAME_CAMELIZING;
    final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
    final boolean defaultValue = prop.isSuppressTableClassificationNameCamelizing();
    return isProperty(key, defaultValue, (Map<String, ? extends Object>) elementMap);
}
Also used : DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Aggregations

DfLittleAdjustmentProperties (org.dbflute.properties.DfLittleAdjustmentProperties)24 DfLanguageDependency (org.dbflute.logic.generate.language.DfLanguageDependency)2 Set (java.util.Set)1 StringTokenizer (java.util.StringTokenizer)1 Column (org.apache.torque.engine.database.model.Column)1 ForeignKey (org.apache.torque.engine.database.model.ForeignKey)1 Table (org.apache.torque.engine.database.model.Table)1 ClassificationUndefinedHandlingType (org.dbflute.jdbc.ClassificationUndefinedHandlingType)1 DfBasicProperties (org.dbflute.properties.DfBasicProperties)1 DfClassificationTop (org.dbflute.properties.assistant.classification.DfClassificationTop)1