return MAPPER;
}
@Override
public Album mapRow(ResultSet rs, int rowNum) throws SQLException {
Album album = new Album();
album.setId(rs.getLong(COLUMN_ID));
album.setOwnerId(rs.getLong(COLUMN_OWNER_ID));
album.setOwnerNickname(rs.getString(COLUMN_OWNER_NICKNAME));
album.setOwnerPortrait(rs.getString(COLUMN_OWNER_PORTRAIT));
album.setAlbumName(rs.getString(COLUMN_ALBUM_NAME));
try {
album.setPlace(rs.getString(COLUMN_PLACE));
} catch (SQLException e) {
album.setPlace(null);
}
try {
album.setDescription(rs.getString(COLUMN_DESCRIPTION));
} catch (SQLException e) {
album.setDescription(null);
}
album.setPhotoNum(rs.getInt(COLUMN_PHOTO_NUM));
album.setCommentNum(rs.getInt(COLUMN_COMMENT_NUM));
album.setVisitNum(rs.getInt(COLUMN_VISIT_NUM));
album.setUp(rs.getInt(COLUMN_UP));
album.setDown(rs.getInt(COLUMN_DOWN));
album.setShareNum(rs.getInt(COLUMN_SHARE_NUM));
album.setCover(rs.getString(COLUMN_COVER));
album.setCoverExt(rs.getString(COLUMN_COVER_EXT));
album.setCreateTime(rs.getTimestamp(COLUMN_CREATE_TIME));
album.setUpdateTime(rs.getTimestamp(COLUMN_UPATE_TIME));
album.setAuthority(rs.getInt(COLUMN_AUTHORITY));
album.setActivity(Activity.valueOf(rs.getString(COLUMN_ACTIVITY)));
return album;
}