Code example for ResultSet

Methods: getDate, getInt, getLong, getString

0
	} 
 
	private static final class BookMapper implements RowMapper<Book> { 
		public Book mapRow(ResultSet rs, int rowNumber) throws SQLException {
			Book book = new Book();
			book.setName(rs.getString("title"));
			book.setId(rs.getInt("book_id"));
			book.setIsbnNumber(rs.getLong("isbn_number"));
			book.setAuthor(rs.getString("authors"));
			book.setCreatedDate(rs.getDate("created_date"));
			book.setModifiedDate(rs.getDate("modified_date"));
			book.setCreatedBy(rs.getString("created_by"));
			book.setModifiedBy(rs.getString("modified_by"));
			return book;
		} 
	} 
}