Examples of IllegalAccountTypeException


Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type))
            throw new IllegalAccountTypeException(type);

        double newBalance = account.getBalance() - amount;

        if (newBalance < 0.0)
            throw new InsufficientFundsException();
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type))
            throw new IllegalAccountTypeException(type);

        double newBalance = account.getBalance() + amount;
        executeTx(amount, description, accountId, newBalance, account);     

    } // deposit
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type) == false)
            throw new IllegalAccountTypeException(type);

        double newBalance = account.getBalance() + amount;

        if (newBalance > account.getCreditLine())
            throw new InsufficientCreditException();
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type) == false)
            throw new IllegalAccountTypeException(type);

        double newBalance = account.getBalance() - amount;
        executeTx(-1 * amount, description, accountId, newBalance, account);     
    } // makePayment
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type))
            throw new IllegalAccountTypeException(type);

        BigDecimal newBalance = account.getBalance().subtract(amount);

        if (newBalance.compareTo(bigZero) == -1)
            throw new InsufficientFundsException();
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type))
            throw new IllegalAccountTypeException(type);

        BigDecimal newBalance = account.getBalance().add(amount);
        executeTx(amount, description, accountId, newBalance, account);     

    } // deposit
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type) == false)
            throw new IllegalAccountTypeException(type);

        BigDecimal newBalance = account.getBalance().add(amount);

        if (newBalance.compareTo(account.getCreditLine())  == 1)
            throw new InsufficientCreditException();
View Full Code Here

Examples of com.sun.ebank.ejb.exception.IllegalAccountTypeException

        Account account = checkAccountArgs(amount, description, accountId);

        String type = account.getType();
        if (DomainUtil.isCreditAccount(type) == false)
            throw new IllegalAccountTypeException(type);

        BigDecimal newBalance = account.getBalance().subtract(amount);
        executeTx(amount.negate(), description, accountId, newBalance,
            account);     
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.