Example usage for javax.sql.rowset JdbcRowSet updateObject

List of usage examples for javax.sql.rowset JdbcRowSet updateObject

Introduction

In this page you can find the example usage for javax.sql.rowset JdbcRowSet updateObject.

Prototype

void updateObject(int columnIndex, Object x) throws SQLException;

Source Link

Document

Updates the designated column with an Object value.

Usage

From source file:com.kumarvv.setl.core.Loader.java

/**
 * sets column value to rowSet from given row data or generators
 *
 * @param load//  w w  w  .  ja v  a  2  s  .  c  o  m
 * @param row
 * @param column
 * @param jrs
 * @throws SQLException
 */
protected void setColumnValue(Load load, Row row, Column column, JdbcRowSet jrs) throws SQLException {
    if (load == null || column == null || jrs == null) {
        return;
    }
    Object val = null;
    if (isNotEmpty(column.getGenerator())) {
        val = sqlRunner.getSingleValue(column.getGenerator(), def.getToDS());
    } else {
        val = getColumnValue(load, row, column);
    }
    if (val != null) {
        jrs.updateObject(column.getName(), val);
    }
}