Search in sources :

Example 11 with DfLanguageDependency

use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.

the class DfMailFluteTableLoader method resolvePackageName.

protected String resolvePackageName(String typeName) {
    final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
    final DfLanguagePropertyPackageResolver resolver = lang.getLanguagePropertyPackageResolver();
    return resolver.resolvePackageName(typeName);
}
Also used : DfLanguageDependency(org.dbflute.logic.generate.language.DfLanguageDependency) DfLanguagePropertyPackageResolver(org.dbflute.logic.generate.language.pkgstyle.DfLanguagePropertyPackageResolver)

Example 12 with DfLanguageDependency

use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.

the class DfColumnListToStringBuilder method getColumnArgsSetupPropertyString.

public static String getColumnArgsSetupPropertyString(String beanName, List<Column> columnList) {
    validateColumnList(columnList);
    final boolean hasPrefix = beanName != null;
    final String beanPrefix = (hasPrefix ? beanName + "." : "");
    final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
    final DfLanguageImplStyle implStyle = lang.getLanguageImplStyle();
    String result = "";
    for (Iterator<Column> ite = columnList.iterator(); ite.hasNext(); ) {
        final Column column = (Column) ite.next();
        final String javaName = column.getJavaName();
        final String variable = column.getUncapitalisedJavaName();
        final String cls = column.getClassificationName();
        final String basic;
        if (column.isForceClassificationSetting()) {
            basic = "set" + javaName + "As" + cls + "(" + variable + ")";
        } else {
            basic = "set" + javaName + "(" + variable + ")";
        }
        final String adjusted = implStyle.adjustEntitySetPropertyCall(basic, !hasPrefix);
        final String setter = beanPrefix + adjusted + ";";
        if ("".equals(result)) {
            result = setter;
        } else {
            result = result + setter;
        }
    }
    return result;
}
Also used : Column(org.apache.torque.engine.database.model.Column) DfLanguageDependency(org.dbflute.logic.generate.language.DfLanguageDependency) DfLanguageImplStyle(org.dbflute.logic.generate.language.implstyle.DfLanguageImplStyle)

Example 13 with DfLanguageDependency

use of org.dbflute.logic.generate.language.DfLanguageDependency 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 14 with DfLanguageDependency

use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.

the class DfPmFileTableLoader method resolvePackageName.

protected String resolvePackageName(String typeName) {
    final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
    final DfLanguagePropertyPackageResolver resolver = lang.getLanguagePropertyPackageResolver();
    return resolver.resolvePackageName(typeName);
}
Also used : DfLanguageDependency(org.dbflute.logic.generate.language.DfLanguageDependency) DfLanguagePropertyPackageResolver(org.dbflute.logic.generate.language.pkgstyle.DfLanguagePropertyPackageResolver)

Example 15 with DfLanguageDependency

use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.

the class DfOutsideSqlAnalyzer method resolvePackageName.

protected String resolvePackageName(String typeName) {
    // [DBFLUTE-271]
    final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
    final DfLanguagePropertyPackageResolver resolver = lang.getLanguagePropertyPackageResolver();
    return resolver.resolvePackageName(typeName);
}
Also used : DfLanguageDependency(org.dbflute.logic.generate.language.DfLanguageDependency) DfLanguagePropertyPackageResolver(org.dbflute.logic.generate.language.pkgstyle.DfLanguagePropertyPackageResolver)

Aggregations

DfLanguageDependency (org.dbflute.logic.generate.language.DfLanguageDependency)26 DfLanguagePropertyPackageResolver (org.dbflute.logic.generate.language.pkgstyle.DfLanguagePropertyPackageResolver)7 Column (org.apache.torque.engine.database.model.Column)4 Map (java.util.Map)3 DfLanguageGrammar (org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)3 DfLanguageImplStyle (org.dbflute.logic.generate.language.implstyle.DfLanguageImplStyle)3 DfLanguageClassPackage (org.dbflute.logic.generate.language.pkgstyle.DfLanguageClassPackage)3 DfBasicProperties (org.dbflute.properties.DfBasicProperties)3 FileNotFoundException (java.io.FileNotFoundException)2 DfLittleAdjustmentProperties (org.dbflute.properties.DfLittleAdjustmentProperties)2 BufferedReader (java.io.BufferedReader)1 BufferedWriter (java.io.BufferedWriter)1 FileInputStream (java.io.FileInputStream)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 OutputStreamWriter (java.io.OutputStreamWriter)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Matcher (java.util.regex.Matcher)1 Pattern (java.util.regex.Pattern)1