Package com.xebia.lottery.domain.aggregates

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


    public CreateCustomerCommandHandler() {
        super(CreateCustomerCommand.class);
    }

    public void handleMessage(CreateCustomerCommand message) {
        Customer customer = customerFactory.create(message.getCustomerId(), message.getInfo(), message.getInitialAccountBalance());
        repository.add(customer);
    }
View Full Code Here


        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

TOP

Related Classes of com.xebia.lottery.domain.aggregates.Customer

Copyright © 2018 www.massapicom. 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.