Search in sources :

Example 26 with StatementConfig

use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.

the class DeleteOption method createStatementConfig.

protected StatementConfig createStatementConfig(StatementConfigCall<StatementConfig> configCall) {
    if (configCall == null) {
        throw new IllegalArgumentException("The argument 'confLambda' should not be null.");
    }
    final StatementConfig config = newStatementConfig();
    configCall.callback(config);
    return config;
}
Also used : StatementConfig(org.dbflute.jdbc.StatementConfig)

Example 27 with StatementConfig

use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.

the class TnStatementFactoryImpl method createPreparedStatement.

// ===================================================================================
// PreparedStatement
// =================
public PreparedStatement createPreparedStatement(Connection conn, String sql) {
    final StatementConfig config = findStatementConfigOnThread();
    final int resultSetType = getResultSetType(config);
    final int resultSetConcurrency = getResultSetConcurrency(config);
    if (isInternalDebugEnabled()) {
        _log.debug("...Preparing statement:(sql, " + resultSetType + ", " + resultSetConcurrency + ")");
    }
    final PreparedStatement ps = prepareStatement(conn, sql, resultSetType, resultSetConcurrency);
    reflectStatementOptions(ps, config);
    return ps;
}
Also used : PreparedStatement(java.sql.PreparedStatement) StatementConfig(org.dbflute.jdbc.StatementConfig)

Example 28 with StatementConfig

use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.

the class TnStatementFactoryImpl method createCallableStatement.

// ===================================================================================
// CallableStatement
// =================
public CallableStatement createCallableStatement(Connection conn, String sql) {
    final StatementConfig config = findStatementConfigOnThread();
    final int resultSetType = getResultSetType(config);
    final int resultSetConcurrency = getResultSetConcurrency(config);
    if (isInternalDebugEnabled()) {
        _log.debug("...Preparing callable:(sql, " + resultSetType + ", " + resultSetConcurrency + ")");
    }
    final CallableStatement cs = prepareCall(conn, sql, resultSetType, resultSetConcurrency);
    reflectStatementOptions(cs, config);
    return cs;
}
Also used : CallableStatement(java.sql.CallableStatement) StatementConfig(org.dbflute.jdbc.StatementConfig)

Example 29 with StatementConfig

use of org.dbflute.jdbc.StatementConfig in project dbflute-core by dbflute.

the class TnStatementFactoryImpl method reflectStatementOptions.

// ===================================================================================
// Statement Reflection
// ====================
// deep logic here
protected void reflectStatementOptions(PreparedStatement ps, StatementConfig config) {
    final StatementConfig actualConfig = getActualStatementConfig(config);
    doReflectStatementOptions(ps, actualConfig);
}
Also used : StatementConfig(org.dbflute.jdbc.StatementConfig)

Aggregations

StatementConfig (org.dbflute.jdbc.StatementConfig)29 BehaviorCommand (org.dbflute.bhv.core.BehaviorCommand)6 CallableStatement (java.sql.CallableStatement)1 PreparedStatement (java.sql.PreparedStatement)1 ConditionBean (org.dbflute.cbean.ConditionBean)1 OutsideSqlContext (org.dbflute.outsidesql.OutsideSqlContext)1