use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.
the class DfOutsideSqlProperties method getDBMetaPackage.
public String getDBMetaPackage() {
final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
final String dbmetaPackage = lang.getLanguageClassPackage().getDBMetaSimplePackage();
return getBaseEntityPackage() + "." + dbmetaPackage;
}
use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.
the class DfColumnListToStringBuilder method getColumnArgsSetupString.
public static String getColumnArgsSetupString(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.adjustEntitySetMethodCall(basic, !hasPrefix);
final String setter = beanPrefix + adjusted + ";";
if ("".equals(result)) {
result = setter;
} else {
result = result + setter;
}
}
return result;
}
use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.
the class DfColumnListToStringBuilder method doGetColumnArgsConditionSetupString.
private static String doGetColumnArgsConditionSetupString(List<Column> columnList) {
validateColumnList(columnList);
final DfLanguageDependency lang = getBasicProperties().getLanguageDependency();
final DfLanguageImplStyle implStyle = lang.getLanguageImplStyle();
final String query = implStyle.adjustConditionBeanLocalCQCall("cb");
final StringBuilder sb = new StringBuilder();
for (Column column : columnList) {
final String javaName = column.getJavaName();
final String variable = column.getUncapitalisedJavaName();
final String setter;
if (column.isForceClassificationSetting()) {
final String cls = column.getClassificationName();
final String basic = "set" + javaName + "_Equal_As" + cls + "(" + variable + ")";
final String adjusted = implStyle.adjustConditionQuerySetMethodCall(basic);
setter = query + "." + adjusted + ";";
} else {
final String basic = "set" + javaName + "_Equal(" + variable + ")";
final String adjusted = implStyle.adjustConditionQuerySetMethodCall(basic);
setter = query + "." + adjusted + ";";
}
sb.append(setter);
}
return sb.toString();
}
use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.
the class DfGapileProcess method createReflector.
protected DfGapileClassReflector createReflector(String gapileDirectory) {
final DfBasicProperties prop = getBasicProperties();
final String outputDirectory = prop.getGenerateOutputDirectory();
final String packageBase = prop.getPackageBase();
final DfLanguageDependency lang = prop.getLanguageDependency();
final DfLanguageClassPackage classPackage = lang.getLanguageClassPackage();
final DfLanguageGrammar grammar = lang.getLanguageGrammar();
return new DfGapileClassReflector(outputDirectory, packageBase, classPackage, grammar, gapileDirectory);
}
use of org.dbflute.logic.generate.language.DfLanguageDependency in project dbflute-core by dbflute.
the class Table method getBehaviorInstanceMethodName.
public String getBehaviorInstanceMethodName() {
// basically for Scala
final String methodName = Srl.initUncap(getExtendedBehaviorClassName());
final DfLanguageDependency lang = getLanguageDependency();
return lang.getLanguageGrammar().adjustMethodInitialChar(methodName);
}
Aggregations