| 1234567891011121314151617181920 |
- package io.zipcoder.persistenceapp.Model;
-
- import org.springframework.jdbc.core.RowMapper;
- import java.sql.ResultSet;
- import java.sql.SQLException;
-
- public class PersonMapper implements RowMapper<Person> {
-
- public Person mapRow(ResultSet resultSet, int rowNum) throws SQLException {
- Person person = new Person();
- person.setID(resultSet.getInt("ID"));
- person.setFirstName(resultSet.getString("FIRST_NAME"));
- person.setLastName(resultSet.getString("LAST_NAME"));
- person.setBirthDate(resultSet.getDate("BIRTHDAY"));
- person.setMobileNumber(resultSet.getString("MOBILE"));
- return person;
- }
-
- }
|