Examples of LotteryInfoQueryResult


Examples of com.xebia.lottery.queries.LotteryInfoQueryResult

    }

    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"),
View Full Code Here

Examples of com.xebia.lottery.queries.LotteryInfoQueryResult

       
        lotteryCreatedEventHandler.handleMessage(new LotteryCreatedEvent(LOTTERY_ID, LOTTERY_INFO));
       
        List<LotteryInfoQueryResult> upcomingLotteries = lotteryQueryService.findUpcomingLotteries();
        assertEquals(1, upcomingLotteries.size());
        LotteryInfoQueryResult lottery = upcomingLotteries.get(0);
        assertEquals(new LotteryInfoQueryResult(LOTTERY_ID, LOTTERY_INFO), lottery);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.