Search in sources :

Example 11 with DfRunnerInformation

use of org.dbflute.helper.jdbc.DfRunnerInformation in project dbflute-core by dbflute.

the class DfSql2EntityTask method doExecute.

// ===================================================================================
// Execute
// =======
@Override
protected void doExecute() {
    setupControlTemplate();
    setupSchemaInformation();
    final DfRunnerInformation runInfo = new DfRunnerInformation();
    runInfo.setDriver(getDriver());
    runInfo.setUrl(getUrl());
    runInfo.setUser(getUser());
    runInfo.setPassword(getPassword());
    // Sql2Entity task immediately breaks the process by error
    runInfo.setBreakCauseThrow(true);
    runInfo.setErrorContinue(false);
    runInfo.setAutoCommit(false);
    // this task does not commit
    runInfo.setRollbackOnly(true);
    // requires to be roll-backed correctly
    runInfo.setIgnoreTxError(false);
    runInfo.setEncoding(getOutsideSqlProperties().getSqlFileEncoding());
    // FireMan's fire result is ignored here because runner's option breakCauseThrow=true
    final DfSqlFileFireMan fireMan = new DfSqlFileFireMan();
    final DfOutsideSqlPack outsideSqlPack = getTargetSqlFileList();
    final DfSqlFileRunner runner = createSqlFileRunner(runInfo, outsideSqlPack);
    fireMan.fire(runner, outsideSqlPack.getPhysicalFileList());
    setupProcedure();
    fireVelocityProcess();
    setupBehaviorQueryPath();
    setupExtendedClassDescription();
    reflectGapileClassIfNeeds();
    showTargetSqlFileInformation(outsideSqlPack);
    showSkippedFileInformation();
    handleException();
    refreshResources();
}
Also used : DfSqlFileFireMan(org.dbflute.helper.jdbc.sqlfile.DfSqlFileFireMan) DfSqlFileRunner(org.dbflute.helper.jdbc.sqlfile.DfSqlFileRunner) DfRunnerInformation(org.dbflute.helper.jdbc.DfRunnerInformation) DfOutsideSqlPack(org.dbflute.logic.sql2entity.analyzer.DfOutsideSqlPack)

Aggregations

DfRunnerInformation (org.dbflute.helper.jdbc.DfRunnerInformation)11 DfSqlFileFireMan (org.dbflute.helper.jdbc.sqlfile.DfSqlFileFireMan)5 File (java.io.File)4 DfSqlFileFireResult (org.dbflute.helper.jdbc.sqlfile.DfSqlFileFireResult)4 DfTakeFinallyAssertionFailureException (org.dbflute.exception.DfTakeFinallyAssertionFailureException)3 DfSqlFileRunner (org.dbflute.helper.jdbc.sqlfile.DfSqlFileRunner)3 DfDatabaseProperties (org.dbflute.properties.DfDatabaseProperties)3 DfTakeFinallyFinalInfo (org.dbflute.logic.replaceschema.finalinfo.DfTakeFinallyFinalInfo)1 DfOutsideSqlPack (org.dbflute.logic.sql2entity.analyzer.DfOutsideSqlPack)1 DfSpecifiedSqlFile (org.dbflute.task.bs.assistant.DfSpecifiedSqlFile)1