use of org.dbflute.properties.facade.DfDatabaseTypeFacadeProp in project dbflute-core by dbflute.
the class DfAbstractHelperProperties method setupConnectionVariousSetting.
private void setupConnectionVariousSetting(UnifiedSchema unifiedSchema, Connection conn) throws SQLException {
conn.setAutoCommit(true);
if (unifiedSchema.existsPureSchema()) {
final DfDatabaseTypeFacadeProp facadeProp = getBasicProperties().getDatabaseTypeFacadeProp();
final DfCurrentSchemaConnector connector = new DfCurrentSchemaConnector(unifiedSchema, facadeProp);
connector.connectSchema(conn);
}
}
use of org.dbflute.properties.facade.DfDatabaseTypeFacadeProp in project dbflute-core by dbflute.
the class AppData method createAsEmpty.
public static AppData createAsEmpty() {
// e.g. ReplaceSchema's generation
final DfBasicProperties basicProp = DfBuildProperties.getInstance().getBasicProperties();
final DfDatabaseTypeFacadeProp facadeProp = basicProp.getDatabaseTypeFacadeProp();
final String databaseType = facadeProp.getTargetDatabase();
final AppData appData = new AppData(databaseType);
final Database database = new Database();
database.setAppData(appData);
appData.addDatabase(database);
return appData;
}
use of org.dbflute.properties.facade.DfDatabaseTypeFacadeProp in project dbflute-core by dbflute.
the class DfRepsSequenceIncrementer method incrementSequenceToDataMax.
// ===================================================================================
// Increment Sequence
// ==================
public void incrementSequenceToDataMax() {
final DfSequenceIdentityProperties sequenceProp = getProperties().getSequenceIdentityProperties();
final Map<String, String> tableSequenceMap = sequenceProp.getTableSequenceMap();
final DfDatabaseTypeFacadeProp dbTypeProp = getDatabaseTypeFacadeProp();
final DfDatabaseProperties databaseProp = getDatabaseProperties();
final DfRepsSequenceHandlerFactory factory = new DfRepsSequenceHandlerFactory(_dataSource, dbTypeProp, databaseProp);
final DfRepsSequenceHandler sequenceHandler = factory.createSequenceHandler();
if (sequenceHandler == null) {
String databaseType = dbTypeProp.getTargetDatabase();
String msg = "Unsupported isIncrementSequenceToDataMax at " + databaseType;
throw new UnsupportedOperationException(msg);
}
sequenceHandler.incrementSequenceToDataMax(tableSequenceMap);
}
use of org.dbflute.properties.facade.DfDatabaseTypeFacadeProp in project dbflute-core by dbflute.
the class DfIndexExtractor method extractIndexMetaData.
protected ResultSet extractIndexMetaData(DatabaseMetaData metaData, UnifiedSchema unifiedSchema, String tableName, boolean retry) throws SQLException {
final boolean uniqueKeyOnly = false;
final DfDatabaseTypeFacadeProp prop = getDatabaseTypeFacadeProp();
return delegateExtractIndexInfoMetaData(metaData, unifiedSchema, tableName, uniqueKeyOnly, retry, prop);
}
use of org.dbflute.properties.facade.DfDatabaseTypeFacadeProp in project dbflute-core by dbflute.
the class DfAbstractDBFluteProperties method setupConnectionVariousSetting.
private void setupConnectionVariousSetting(UnifiedSchema unifiedSchema, Connection conn) throws SQLException {
conn.setAutoCommit(true);
if (unifiedSchema.existsPureSchema()) {
final DfDatabaseTypeFacadeProp facadeProp = getBasicProperties().getDatabaseTypeFacadeProp();
final DfCurrentSchemaConnector connector = new DfCurrentSchemaConnector(unifiedSchema, facadeProp);
connector.connectSchema(conn);
}
}
Aggregations