package db.mapping; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; import db.bean.Employee; public class EmployeeMapper implements RowMapper { @Override public Object mapRow(ResultSet rs, int arg1) throws SQLException { // TODO Auto-generated method stub Employee emp = new Employee(); emp.setId(rs.getInt(1)); emp.setName(rs.getString(2)); emp.setDept_id(rs.getInt(3)); return emp; } }