Example usage for org.apache.commons.beanutils RowSetDynaClass RowSetDynaClass

List of usage examples for org.apache.commons.beanutils RowSetDynaClass RowSetDynaClass

Introduction

In this page you can find the example usage for org.apache.commons.beanutils RowSetDynaClass RowSetDynaClass.

Prototype

public RowSetDynaClass(ResultSet resultSet, boolean lowerCase, int limit) throws SQLException 

Source Link

Document

Construct a new RowSetDynaClass for the specified ResultSet.

Usage

From source file:com.glaf.report.jxls.ReportManagerImpl.java

public List<?> exec(String sql) throws SQLException {
    try {/*  w  w  w.j a v  a 2 s.com*/
        sql = evaluate(sql, beans);
    } catch (Exception ex) {
        log.error(sql);
        ex.printStackTrace();
    }
    sql = sql.replaceAll("&apos;", "'");
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    RowSetDynaClass rsdc = new RowSetDynaClass(rs, false, true);
    stmt.close();
    rs.close();
    return rsdc.getRows();
}