}
public List<LotteryInfoQueryResult> findUpcomingLotteries() {
return simpleJdbcTemplate.query("select id, version, name, drawing_timestamp, prize_amount, ticket_price from lottery order by name", new ParameterizedRowMapper<LotteryInfoQueryResult>() {
public LotteryInfoQueryResult mapRow(ResultSet rs, int rowNum) throws SQLException {
return new LotteryInfoQueryResult(
VersionedId.forSpecificVersion(UUID.fromString(rs.getString("id")), rs.getLong("version")),
new LotteryInfo(
rs.getString("name"),
new Date(rs.getTimestamp("drawing_timestamp").getTime()),
rs.getDouble("prize_amount"),