use of com.bitcamp.open.member.model.Member2 in project bitcampSCOpen2017 by ryuyj.
the class MemberView method buildExcelDocument.
@Override
protected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
// 1. 시트 생성
HSSFSheet sheet = createFirstSheet(workbook);
// 2. 라벨 처리
createColumnLabel(sheet);
// 3. 각 행별 데이터 처리
List<Member2> members = (List<Member2>) model.get("members");
int rowNum = 3;
for (Member2 member : members) {
createMemberRow(sheet, member, rowNum++);
}
// 파일 이름설정
response.setHeader("Content-Disposition", "attachment; filename=\"pagerank.xls\";");
}
use of com.bitcamp.open.member.model.Member2 in project bitcampSCOpen2017 by ryuyj.
the class MemberDao method xml_showList.
public List<Member2> xml_showList() {
// TODO Auto-generated method stub
String sql = "select idx,member_id,member_name,regdate from member";
List<Member2> result = jdbcTemplate.query(sql, new RowMapper<Member2>() {
@Override
public Member2 mapRow(ResultSet rs, int arg1) throws SQLException {
// TODO Auto-generated method stub
Member2 mem = new Member2();
mem.setIdx(rs.getInt("idx"));
mem.setMember_id(rs.getString("member_id"));
mem.setMember_name(rs.getString("member_name"));
mem.setRegdate(rs.getDate("regdate"));
return mem;
}
});
return result.isEmpty() ? null : result;
}
Aggregations