Created
September 30, 2016 01:30
-
-
Save stevenschlansker/24a884bfa439da098b2eccdeba56fb4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dao.impl; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import org.skife.jdbi.v2.StatementContext; | |
import org.skife.jdbi.v2.tweak.ResultSetMapper; | |
import com.pojo.Student; | |
public class StudentMapper implements ResultSetMapper<Student> | |
{ | |
public static final StudentMapper INSTANCE = new StudentMapper(); | |
@Override | |
public Student map(int index, ResultSet r, StatementContext ctx) | |
throws SQLException | |
{ | |
Student s = new Student(); | |
s.setUserName(r.getString("user_name")); | |
s.setUserName2(r.getString("user_name_2")); | |
s.setUserName3(r.getString("user_name_3")); | |
s.setUserName4(r.getString("user_name_4")); | |
s.setUserName5(r.getString("user_name_5")); | |
s.setUserName6(r.getString("user_name_6")); | |
s.setUserName7(r.getString("user_name_7")); | |
s.setUserName8(r.getString("user_name_8")); | |
s.setUserName9(r.getString("user_name_9")); | |
s.setUserName10(r.getString("user_name_10")); | |
s.setUserName11(r.getString("user_name_11")); | |
s.setUserName12(r.getString("user_name_12")); | |
return s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment