Package com.sun.ebank.ejb.exception

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


        Collection txIds;
        ArrayList txList = new ArrayList();

        if (startDate == null)
            throw new InvalidParameterException("null startDate");

        if (endDate == null)
            throw new InvalidParameterException("null endDate");

        if (accountId == null)
            throw new InvalidParameterException("null accountId");

        try {
            txIds = txHome.findByAccountId(startDate, endDate, accountId);
        } catch (Exception ex) {
             return txList;
View Full Code Here


        throws TxNotFoundException, InvalidParameterException {

        Debug.print("TxControllerBean getDetails");

        if (txId == null)
           throw new InvalidParameterException("null txId");

        try {
            Tx tx = txHome.findByPrimaryKey(txId);
            return tx.getDetails();
        } catch (Exception ex) {
View Full Code Here

        AccountNotFoundException {

        Account account = null;

        if (description == null)
            throw new InvalidParameterException("null description");

        if (accountId == null)
            throw new InvalidParameterException("null accountId" );

        if (amount.compareTo(bigZero) != 1)
           throw new InvalidParameterException("amount <= 0");

        try {
            account = accountHome.findByPrimaryKey(accountId);
        } catch (Exception ex) {
            throw new AccountNotFoundException(accountId);
View Full Code Here

        // returns accountId

        Debug.print("AccountControllerBean createAccount");

        if (customerId == null)
            throw new InvalidParameterException("null customerId" );

        if (type == null)
            throw new InvalidParameterException("null type");

        if (description == null)
            throw new InvalidParameterException("null description");

        if (beginBalanceTimeStamp == null)
            throw new InvalidParameterException("null beginBalanceTimeStamp");

        DomainUtil.checkAccountType(type);

        if (customerExists(customerId) == false)
            throw new CustomerNotFoundException(customerId);
View Full Code Here

       // removes account from db

        Debug.print("AccountControllerBean removeAccount");

        if (accountId == null)
            throw new InvalidParameterException("null accountId" );

        if (accountExists(accountId) == false)
            throw new AccountNotFoundException(accountId);

        try {
View Full Code Here

        // adds another customer to the account

        Debug.print("AccountControllerBean addCustomerToAccount");

        if (customerId == null)
            throw new InvalidParameterException("null customerId" );

        if (accountId == null)
            throw new InvalidParameterException("null accountId" );

        ArrayList customerIds;
        CustomerHome customerHome;

        if (customerExists(customerId) == false)
View Full Code Here

        Debug.print("AccountControllerBean removeCustomerFromAccount");

        ArrayList customerIds;

        if (customerId == null)
            throw new InvalidParameterException("null customerId" );

        if (accountId == null)
            throw new InvalidParameterException("null accountId" );

        if (accountExists(accountId) == false)
            throw new AccountNotFoundException(accountId);

        try {
View Full Code Here

        Debug.print("AccountControllerBean getAccountsOfCustomer");

        Collection accountIds;

        if (customerId == null)
            throw new InvalidParameterException("null customerId");

        try {
            accountIds = accountHome.findByCustomerId(customerId);
            if (accountIds.isEmpty())
                throw new AccountNotFoundException();
View Full Code Here

        // returns customerId

        Debug.print("CustomerControllerBean createCustomer");

        if (lastName == null)
            throw new InvalidParameterException("null lastName");
        if (firstName == null)
            throw new InvalidParameterException("null firstName");

        try {
            makeConnection();
            customerId = DBHelper.getNextCustomerId(con);
            customer = customerHome.create(customerId,
View Full Code Here

        Debug.print("AccountControllerBean getDetails");

        AccountDetails result;

        if (accountId == null)
            throw new InvalidParameterException("null accountId" );

        if (accountExists(accountId) == false)
            throw new AccountNotFoundException(accountId);

View Full Code Here

TOP

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

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.