class ApplicationFinanceRowServiceImpl extends BaseTransactionalService implements ApplicationFinanceRowService {

    @Override
    public ServiceResult<FinanceRowItem> get(final long financeRowId) {
        Optional<FinanceRowItem> financeRowItem = financeRowRepository.findById(financeRowId).map(applicationFinanceRow -> {
            ApplicationFinance applicationFinance = applicationFinanceRow.getTarget();
            OrganisationTypeFinanceHandler organisationFinanceHandler = organisationFinanceDelegate.getOrganisationFinanceHandler(applicationFinance.getApplication().getCompetition().getId(), applicationFinance.getOrganisation().getOrganisationType().getId());
            return organisationFinanceHandler.toResource(applicationFinanceRow);
        });
        if (!financeRowItem.isPresent()) {
            LOG.error("IFS-5593 unable to find a FinanceRowItem for financeRowId: " + financeRowId);
        }
        return financeRowItem.map(item -> serviceSuccess(item)).orElse(serviceFailure(GENERAL_NOT_FOUND));
    }

}