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 ForeignKey method isSuppressReferrerRelation.
protected boolean isSuppressReferrerRelation() {
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
final Map<String, Set<String>> referrerRelationMap = prop.getSuppressReferrerRelationMap();
final Set<String> relationNameSet = referrerRelationMap.get(getForeignTable().getTableDbName());
if (relationNameSet == null) {
return false;
}
// the table exists in the map here
final String relationName;
if (isOneToOne()) {
relationName = getReferrerPropertyNameAsOne();
} else {
relationName = getReferrerPropertyName();
}
if (relationNameSet.contains("$$ALL$$")) {
if (relationNameSet.contains("!" + relationName)) {
// pinpoint include
return false;
}
return true;
}
return relationNameSet.contains(relationName);
}
use of org.dbflute.properties.DfLittleAdjustmentProperties in project dbflute-core by dbflute.
the class Table method hasColumnNullObjectProviderImport.
public boolean hasColumnNullObjectProviderImport() {
final DfLittleAdjustmentProperties prop = getLittleAdjustmentProperties();
final String providerPackage = prop.getColumnNullObjectProviderPackage();
return providerPackage != null && hasColumnNullObjectColumn();
}
Aggregations