📄 userinforowmapper.java
字号:
package com.srit.gcz.bean.rowmapper.user;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import com.srit.gcz.bean.user.UserInfo;
/**
* 对用户
* @author 谢锦清
*
*/
public class UserInfoRowMapper implements RowMapper {
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
UserInfo userInfo = new UserInfo();
userInfo.setId(new Integer(rs.getInt("id")));
userInfo.setUserName(rs.getString("username"));
userInfo.setPassword(rs.getString("password"));
userInfo.setBirthday(rs.getDate("birthday"));
userInfo.setBirthorigin(rs.getString("birthorigin"));
userInfo.setAddress(rs.getString("address"));
userInfo.setPost(rs.getString("post"));
userInfo.setPhone1(rs.getString("phone1"));
userInfo.setPhone2(rs.getString("phone2"));
userInfo.setTitle(rs.getString("title"));
userInfo.setSex(new Integer(rs.getInt("sex")));
userInfo.setEmail(rs.getString("email"));
userInfo.setRemark(rs.getString("remark"));
userInfo.setLoginName(rs.getString("loginname"));
return userInfo;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -