use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.
the class DfLReverseOutputHandler method deriveSheetName.
protected String deriveSheetName(Table table) {
// if schema-driven, output with table name with schema as sheet name
// it depends on ReplaceSchema specification whether the data file can be loaded or not
final String tableDbName = table.getTableDbName();
// sheet name's case is depends on table display name's case
// because sheet name (as table name) is also display name
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
return prop.isTableDispNameUpperCase() ? tableDbName.toUpperCase() : tableDbName;
}
use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.
the class DfTableMeta method getTableSqlName.
public String getTableSqlName() {
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
final String quotedName = prop.quoteTableNameIfNeedsDirectUse(_tableName);
// driven is resolved here so it uses pure name here
return _unifiedSchema.buildSqlName(quotedName);
}
use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.
the class DfLanguagePropertyPackageResolverJava method processLanguageType.
protected String processLanguageType(String typeName, boolean exceptUtil) {
if (!exceptUtil) {
final String listType = processListType(typeName, exceptUtil, getListPackage(), "List");
if (listType != null) {
return listType;
}
final String mapType = processMapType(typeName, exceptUtil, getMapPackage(), "Map");
if (mapType != null) {
return mapType;
}
}
if (typeName.equals("BigDecimal")) {
return getBigDecimalPackage() + "." + typeName;
}
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
if (typeName.equals("LocalDate")) {
return getJava8LocalDate();
}
if (typeName.equals("LocalDateTime")) {
return getJava8LocalDateTime();
}
if (typeName.equals("Date")) {
if (prop.isAvailableJava8TimeLocalDateEntity()) {
if (prop.needsDateTreatedAsLocalDateTime()) {
return getJava8LocalDateTime();
} else {
return getJava8LocalDate();
}
}
if (!exceptUtil) {
return "java.util." + typeName;
}
}
if (typeName.equals("Timestamp")) {
if (prop.isAvailableJava8TimeLocalDateEntity()) {
return getJava8LocalDateTime();
}
return "java.sql." + typeName;
}
if (typeName.equals("Time")) {
return "java.sql." + typeName;
}
return null;
}
use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.
the class DfAdditionalForeignKeyInitializer method setupForeignKeyToTable.
protected void setupForeignKeyToTable(String foreignKeyName, String foreignTableName, List<String> foreignColumnNameList, Table table, List<String> localColumnNameList, DfAdditionalForeignKeyOption option) {
// set up foreign key instance
final ForeignKey fk = createAdditionalForeignKey(foreignKeyName, foreignTableName, localColumnNameList, foreignColumnNameList, option);
reflectOptionToExistingFKIfNeeds(foreignKeyName, option, fk);
table.addForeignKey(fk);
// set up referrer instance
final Table foreignTable = getTable(foreignTableName);
final boolean canBeReferrer = foreignTable.addReferrer(fk);
if (canBeReferrer) {
for (String foreignColumnName : foreignColumnNameList) {
final Column foreignColumn = foreignTable.getColumn(foreignColumnName);
foreignColumn.addReferrer(fk);
}
} else {
_log.info(" *Referrer setting was not allowed in this case");
}
// set up implicit reverse foreign key if fixed condition is valid
// (and if a same-structured FK does not exist)
// because biz-one-to-one needs reverse foreign key for ConditionBean's Specify
// ...
// ...
// Sorry, I forgot the detail of the reason...
// ...
// ...
// (2014/09/18)
// actually, no problem for generation if suppressed
// so suppressed (deprecated) as default since 1.1
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
if (prop.isCompatibleBizOneToOneImplicitReverseFkAllowed()) {
// basically false since 1.1
if (fk.hasFixedCondition() && !isSuppressImplicitReverseFK(foreignKeyName)) {
// but compatible just in case
if (!fk.isFixedReferrer()) {
processImplicitReverseForeignKey(fk, table, foreignTable, localColumnNameList, foreignColumnNameList, option);
}
}
}
}
use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.
the class DfClassificationResourceFileAnalyzer method setupClassificationTopOption.
protected void setupClassificationTopOption(DfClassificationTop classificationTop) {
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
classificationTop.setCheckClassificationCode(prop.isPlainCheckClassificationCode());
classificationTop.setUndefinedHandlingType(prop.getClassificationUndefinedHandlingType());
// analyzed after
// classificationTop.setCheckImplicitSet(false);
classificationTop.setCheckSelectedClassification(prop.isCheckSelectedClassification());
classificationTop.setForceClassificationSetting(prop.isForceClassificationSetting());
}
Aggregations