Example usage for org.springframework.jdbc.object SqlFunction SqlFunction

List of usage examples for org.springframework.jdbc.object SqlFunction SqlFunction

Introduction

In this page you can find the example usage for org.springframework.jdbc.object SqlFunction SqlFunction.

Prototype

public SqlFunction(DataSource ds, String sql, int[] types, Class<T> resultType) 

Source Link

Document

Create a new SqlFunction object with SQL, parameters and a result type.

Usage

From source file:org.iwethey.forums.db.JdbcAdminManager.java

/**
 * Set the datasource to use for this database interface.
 * <p>//from  w  w  w .  ja  va2  s  .c o  m
 * @param ds The datasource as determined in the application context.
 */
public void setDataSource(DataSource ds) {
    mDatasource = ds;

    mLRPDRetriever = new SqlFunction(ds, GET_LRPD_SQL, new int[] { java.sql.Types.INTEGER }, String.class);
    mLRPDRetriever.compile();
}