org.satic.persistence.pojo.DAO.rowMapper.GradoRowMapper.java Source code

Java tutorial

Introduction

Here is the source code for org.satic.persistence.pojo.DAO.rowMapper.GradoRowMapper.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.satic.persistence.pojo.DAO.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.satic.persistence.pojo.Grado;
import org.springframework.jdbc.core.RowMapper;

/**
 *
 * @author miguel
 */
public class GradoRowMapper implements RowMapper<Grado> {

    @Override
    public Grado mapRow(ResultSet rs, int i) throws SQLException {
        Grado g = new Grado();
        g.setIdGrado(rs.getInt("id_grado"));
        g.setNombre(rs.getString("nombre"));
        g.setDescripcion(rs.getString("descripcion"));
        return g;
    }

}