class LoanServiceFacadeWebTier implements LoanServiceFacade {

    @Override
    public OriginalScheduleInfoDto retrieveOriginalLoanSchedule(Integer accountId) {
        try {
            List<OriginalLoanScheduleEntity> loanScheduleEntities = loanBusinessService.retrieveOriginalLoanSchedule(accountId);
            ArrayList<RepaymentScheduleInstallment> repaymentScheduleInstallments = new ArrayList<RepaymentScheduleInstallment>();
            for (OriginalLoanScheduleEntity loanScheduleEntity : loanScheduleEntities) {
                  repaymentScheduleInstallments.add(loanScheduleEntity.toDto());
            }

            LoanBO loan = this.loanDao.findById(accountId);
            return new OriginalScheduleInfoDto(loan.getLoanAmount().toString(),loan.getDisbursementDate(),repaymentScheduleInstallments);
        } catch (PersistenceException e) {
            throw new MifosRuntimeException(e);
        }
    }

    @Autowired public  LoanServiceFacadeWebTier(final LoanDao loanDao, LoanBusinessService loanBusinessService);

}