Package com.excilys.ebi.bank.model.entity.ref

Examples of com.excilys.ebi.bank.model.entity.ref.OperationStatusRef


    debitedAccount.setBalance(debitedAccount.getBalance().subtract(amount));
    creditedAccount.setBalance(creditedAccount.getBalance().add(amount));

    DateTime now = now();
    OperationStatusRef status = operationStatusDao.findOne(OperationStatus.RESOLVED);
    OperationTypeRef type = operationTypeDao.findOne(OperationType.TRANSFER);

    Operation debitOperation = newOperation().withName("transfert -" + amount).withAccount(debitedAccount).withAmount(amount.negate()).withDate(now).withStatus(status)
        .withType(type).build();
    Operation creditOperation = newOperation().withName("transfert +" + amount).withAccount(creditedAccount).withAmount(amount).withDate(now).withStatus(status).withType(type)
View Full Code Here

TOP

Related Classes of com.excilys.ebi.bank.model.entity.ref.OperationStatusRef

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.