Examples of Lottery


Examples of com.xebia.lottery.domain.aggregates.Lottery

        super(PurchaseTicketCommand.class);
        this.repository = repository;
    }

    public void handleMessage(PurchaseTicketCommand command) {
        Lottery lottery = repository.getByVersionedId(Lottery.class, command.getLotteryId());
        Customer customer = repository.getByVersionedId(Customer.class, command.getCustomerId());
        lottery.purchaseTicketForCustomer(customer);
    }
View Full Code Here

Examples of com.xebia.lottery.domain.aggregates.Lottery

    public CreateLotteryCommandHandler() {
        super(CreateLotteryCommand.class);
    }

    public void handleMessage(CreateLotteryCommand message) {
        Lottery lottery = new Lottery(message.getLotteryId(), message.getInfo());
        repository.add(lottery);
    }
View Full Code Here

Examples of com.xebia.lottery.domain.aggregates.Lottery

    public DrawLotteryCommandHandler() {
        super(DrawLotteryCommand.class);
    }

    public void handleMessage(DrawLotteryCommand message) {
        Lottery lottery = repository.getByVersionedId(Lottery.class, message.getLotteryId());
        lottery.draw();
    }
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.