Example usage for org.springframework.jdbc.core ArgumentPreparedStatementSetter ArgumentPreparedStatementSetter

List of usage examples for org.springframework.jdbc.core ArgumentPreparedStatementSetter ArgumentPreparedStatementSetter

Introduction

In this page you can find the example usage for org.springframework.jdbc.core ArgumentPreparedStatementSetter ArgumentPreparedStatementSetter.

Prototype

public ArgumentPreparedStatementSetter(@Nullable Object[] args) 

Source Link

Document

Create a new ArgPreparedStatementSetter for the given arguments.

Usage

From source file:com.emc.ecs.sync.service.RowIterator.java

public RowIterator(DataSource ds, RowMapper<T> rowMapper, String query, Object... params) {
    try {/*from   ww w.j a v a 2 s . c  o m*/
        this.rowMapper = rowMapper;
        this.con = ds.getConnection();
        this.st = con.prepareStatement(query);
        if (params != null && params.length > 0)
            new ArgumentPreparedStatementSetter(params).setValues(st);
        this.rs = st.executeQuery();
    } catch (SQLException e) {
        close();
        throw new RuntimeException(e);
    }
}