use of org.dbflute.DfBuildProperties in project dbflute-core by dbflute.
the class TypeMap method setupPropertyNativeMap.
protected static void setupPropertyNativeMap() {
final DfBuildProperties prop = getProperties();
_propertyJdbcTypeToJavaNativeMap = prop.getTypeMappingProperties().getJdbcToJavaNativeMap();
_propertyJavaNativeToFlexNativeMap = prop.getFlexDtoProperties().getJavaToFlexNativeMap();
}
use of org.dbflute.DfBuildProperties in project dbflute-core by dbflute.
the class DfSchemaXmlSerializer method createAsCore.
/**
* Create instance as core process (that is JDBC task).
* @param dataSource The data source of the database. (NotNull)
* @return The new instance. (NotNull)
*/
public static DfSchemaXmlSerializer createAsCore(DfSchemaSource dataSource) {
final DfBuildProperties buildProp = DfBuildProperties.getInstance();
final DfBasicProperties basicProp = buildProp.getBasicProperties();
final DfSchemaXmlFacadeProp facadeProp = basicProp.getSchemaXmlFacadeProp();
final String schemaXml = facadeProp.getProejctSchemaXMLFile();
final String historyFile = facadeProp.getProjectSchemaHistoryFile();
final DfSchemaXmlSerializer serializer = newSerializer(dataSource, schemaXml, historyFile);
final DfDocumentProperties docProp = buildProp.getDocumentProperties();
final String craftMetaDir = docProp.getCoreCraftMetaDir();
serializer.enableCraftDiff(dataSource, craftMetaDir, DfCraftDiffAssertDirection.ROLLING_NEXT);
// to avoid getting nonsense differences in JDBC task
serializer.keepDefinitionOrderAsPrevious();
return serializer;
}
use of org.dbflute.DfBuildProperties in project dbflute-core by dbflute.
the class Database method checkProperties.
// ===================================================================================
// Check Properties
// ================
/**
* Check properties as mutually related validation. <br>
* This is basically for Generate task. (Not Sql2Entity)
*/
public void checkProperties() {
final DfBuildProperties prop = getProperties();
final DfTableListProvider tableListProvider = new DfTableListProvider() {
public List<Table> provideTableList() {
return getTableList();
}
};
prop.getCommonColumnProperties().checkDefinition(tableListProvider);
prop.getOptimisticLockProperties().checkDefinition(tableListProvider);
final DfTableDeterminer tableDeterminer = new DfTableDeterminer() {
public boolean hasTable(String tableName) {
return getTable(tableName) != null;
}
public boolean hasTableColumn(String tableName, String columnName) {
if (!hasTable(tableName)) {
return false;
}
return getTable(tableName).getColumn(columnName) != null;
}
};
// give up because all mark provides complex structure and also for Sql2Entity case
// so cost-benefit performance is low (to suppress degrading is prior)
// prop.getClassificationProperties().checkProperties(tableDeterminer);
prop.getLittleAdjustmentProperties().checkDefinition(tableDeterminer);
prop.getSequenceIdentityProperties().checkDefinition(tableDeterminer);
getBasicProperties().checkDirectoryPackage();
}
Aggregations