Search in sources :

Example 16 with DfLittleAdjustmentProperties

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

the class DfForeignKeyMeta method getForeignTableSqlName.

public String getForeignTableSqlName() {
    if (_foreignSchema == null) {
        return _foreignTablePureName;
    }
    final DfLittleAdjustmentProperties prop = DfBuildProperties.getInstance().getLittleAdjustmentProperties();
    final String quotedName = prop.quoteTableNameIfNeedsDirectUse(_foreignTablePureName);
    // driven is resolved here so it uses pure name here
    return _foreignSchema.buildSqlName(quotedName);
}
Also used : DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Example 17 with DfLittleAdjustmentProperties

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

the class Column method needsOracleDateHandling.

public boolean needsOracleDateHandling() {
    // also see DBFluteConfig.vm
    final boolean oracle = getBasicProperties().isDatabaseOracle();
    final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
    final boolean java8LocalDate = prop.isAvailableJava8TimeLocalDateEntity();
    final boolean nativeJDBC = prop.isAvailableDatabaseNativeJDBC();
    return oracle && nativeJDBC && java8LocalDate && isDbTypeOracleDate();
}
Also used : DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Example 18 with DfLittleAdjustmentProperties

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

the class JavaNameGenerator method underscoreMethod.

/**
 * Converts a database schema name to java object name.  Removes
 * <code>STD_SEPARATOR_CHAR</code>, capitilizes first letter of
 * name and each letter after the <code>STD_SEPERATOR</code>,
 * converts the rest of the letters to lowercase.
 * @param schemaName name to be converted.
 * @return converted name.
 * @see org.apache.torque.engine.database.model.NameGenerator
 * @see #underscoreMethod(String)
 */
protected String underscoreMethod(String schemaName) {
    StringBuffer name = new StringBuffer();
    StringTokenizer tok = new StringTokenizer(schemaName, String.valueOf(STD_SEPARATOR_CHAR));
    DfLittleAdjustmentProperties prop = DfBuildProperties.getInstance().getLittleAdjustmentProperties();
    boolean availableToLowerInGeneratorUnderscoreMethod = prop.isAvailableToLowerInGeneratorUnderscoreMethod();
    while (tok.hasMoreTokens()) {
        String namePart = ((String) tok.nextElement());
        if (availableToLowerInGeneratorUnderscoreMethod) {
            namePart = namePart.toLowerCase();
        }
        name.append(initCap(namePart));
    }
    return name.toString();
}
Also used : StringTokenizer(java.util.StringTokenizer) DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Example 19 with DfLittleAdjustmentProperties

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

the class Column method getColumnNullObjectProviderExp.

public String getColumnNullObjectProviderExp() {
    final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
    final Table table = getTable();
    final String pkExp = table.getPrimaryKeyGetterCommaString();
    return prop.buildColumnNullObjectProviderExp(table.getTableDbName(), getName(), pkExp);
}
Also used : DfLittleAdjustmentProperties(org.dbflute.properties.DfLittleAdjustmentProperties)

Example 20 with DfLittleAdjustmentProperties

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

the class ForeignKey method getReferrerConditionMethodIdentityName.

public String getReferrerConditionMethodIdentityName() {
    final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
    final boolean hasListSufix = prop.isCompatibleReferrerCBMethodIdentityNameListSuffix();
    final String suffix = hasListSufix ? "List" : "";
    return initCap(getReferrerPropertyName(true, suffix));
}
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