Example usage for org.springframework.jdbc.core.namedparam NamedParameterJdbcOperations getJdbcOperations

List of usage examples for org.springframework.jdbc.core.namedparam NamedParameterJdbcOperations getJdbcOperations

Introduction

In this page you can find the example usage for org.springframework.jdbc.core.namedparam NamedParameterJdbcOperations getJdbcOperations.

Prototype

JdbcOperations getJdbcOperations();

Source Link

Document

Expose the classic Spring JdbcTemplate to allow invocation of classic JDBC operations.

Usage

From source file:org.geoserver.jdbcstore.internal.JDBCQueryHelper.java

protected void runScript(Resource script) {
    NamedParameterJdbcOperations template = new NamedParameterJdbcTemplate(ds);

    try (InputStream in = script.in()) {
        Util.runScript(in, template.getJdbcOperations(), null);
    } catch (IOException ex) {
        throw new IllegalArgumentException("Could not execute provided sql script", ex);
    }/*from   w ww .  java2s  .c  o m*/
}