Package com.sun.ebank.ejb.exception

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


            throw new IllegalAccountTypeException(type);

        double newBalance = account.getBalance() - amount;

        if (newBalance < 0.0)
            throw new InsufficientFundsException();

        executeTx(-1 * amount, description, accountId, newBalance, account);

    } // withdraw
View Full Code Here


            executeTx(amount, description, fromAccountId,
                fromNewBalance, fromAccount);
        } else {
            double fromNewBalance =  fromBalance - amount;
            if (fromNewBalance < 0.0)
                throw new InsufficientFundsException();
            executeTx(-1 * amount, description, fromAccountId,
                fromNewBalance, fromAccount);
        }
          
        String toType = toAccount.getType();
View Full Code Here

            throw new IllegalAccountTypeException(type);

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

        if (newBalance.compareTo(bigZero) == -1)
            throw new InsufficientFundsException();

        executeTx(amount.negate(), description, accountId, newBalance,
            account);

    } // withdraw
View Full Code Here

            executeTx(amount, description, fromAccountId,
                fromNewBalance, fromAccount);
        } else {
            BigDecimal fromNewBalance =  fromBalance.subtract(amount);
            if (fromNewBalance.compareTo(bigZero) == -1)
                throw new InsufficientFundsException();
            executeTx(amount.negate(), description, fromAccountId,
                fromNewBalance, fromAccount);
        }
           
        String toType = toAccount.getType();
View Full Code Here

TOP

Related Classes of com.sun.ebank.ejb.exception.InsufficientFundsException

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.