Examples of SavingsAccountNotFoundException


Examples of org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException

        this.repository = repository;
    }

    public SavingsAccount findOneWithNotFoundDetection(final Long savingsId) {
        final SavingsAccount account = this.repository.findOne(savingsId);
        if (account == null) { throw new SavingsAccountNotFoundException(savingsId); }
        return account;
    }
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException

        return account;
    }

    public SavingsAccount findOneWithNotFoundDetection(final Long savingsId, final DepositAccountType depositAccountType) {
        final SavingsAccount account = this.repository.findByIdAndDepositAccountType(savingsId, depositAccountType.getValue());
        if (account == null) { throw new SavingsAccountNotFoundException(savingsId); }
        return account;
    }
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException

        try {
            final String sql = "select " + this.savingAccountMapper.schema() + " where sa.id = ?";

            return this.jdbcTemplate.queryForObject(sql, this.savingAccountMapper, new Object[] { accountId });
        } catch (final EmptyResultDataAccessException e) {
            throw new SavingsAccountNotFoundException(accountId);
        }
    }
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException

            final String sql = "select " + this.transactionTemplateMapper.schema() + " where sa.id = ? and sa.deposit_type_enum = ?";

            return this.jdbcTemplate.queryForObject(sql, this.transactionTemplateMapper,
                    new Object[] { savingsId, depositAccountType.getValue() });
        } catch (final EmptyResultDataAccessException e) {
            throw new SavingsAccountNotFoundException(savingsId);
        }
    }
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.exception.SavingsAccountNotFoundException

        SavingsAccount savingsAccount = null;
        final Long savingsId = command.longValueOfParameterNamed(ClientApiConstants.savingsAccountIdParamName);
        if (savingsId != null) {
            savingsAccount = this.savingsRepository.findOne(savingsId);
            if (savingsAccount == null) { throw new SavingsAccountNotFoundException(savingsId); }
            if (!savingsAccount.getClient().identifiedBy(clientId)) {
                String defaultUserMessage = "saving account must belongs to client";
                throw new InvalidClientSavingProductException("saving.account", "must.belongs.to.client", defaultUserMessage, savingsId,
                        clientForUpdate.getId());
            }
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.