Package org.springframework.jdbc.support.rowset

Examples of org.springframework.jdbc.support.rowset.SqlRowSet.beforeFirst()


        final SqlRowSet columnDefinitions = getDatatableMetaData(datatable);

        final List<ResultsetColumnHeaderData> columnHeaders = new ArrayList<>();

        columnDefinitions.beforeFirst();
        while (columnDefinitions.next()) {
            final String columnName = columnDefinitions.getString("COLUMN_NAME");
            final String isNullable = columnDefinitions.getString("IS_NULLABLE");
            final String isPrimaryKey = columnDefinitions.getString("COLUMN_KEY");
            final String columnType = columnDefinitions.getString("DATA_TYPE");
View Full Code Here


        final String sql = "select v.id, v.code_score, v.code_value from m_code m " + " join m_code_value v on v.code_id = m.id "
                + " where m.code_name = '" + codeName + "' order by v.order_position, v.id";

        final SqlRowSet rsValues = this.jdbcTemplate.queryForRowSet(sql);

        rsValues.beforeFirst();
        while (rsValues.next()) {
            final Integer id = rsValues.getInt("id");
            final String codeValue = rsValues.getString("code_value");
            final Integer score = rsValues.getInt("code_score");
View Full Code Here

        final List<ResultsetColumnValueData> columnValues = new ArrayList<>();
        if (codeId != null) {
            final String sql = "select v.id, v.code_value from m_code_value v where v.code_id =" + codeId
                    + " order by v.order_position, v.id";
            final SqlRowSet rsValues = this.jdbcTemplate.queryForRowSet(sql);
            rsValues.beforeFirst();
            while (rsValues.next()) {
                final Integer id = rsValues.getInt("id");
                final String codeValue = rsValues.getString("code_value");
                columnValues.add(new ResultsetColumnValueData(id, codeValue));
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.