class ProjectFinanceHandlerImpl implements ProjectFinanceHandler {

    @Override
    @Transactional
    public ServiceResult<ProjectFinanceResource> getProjectOrganisationFinances(ProjectFinanceResourceId projectFinanceResourceId) {
        return getProjectFinanceForOrganisation(projectFinanceResourceId.getProjectId(), projectFinanceResourceId.getOrganisationId()).
                andOnSuccessReturn(
                        projectFinance -> {
                            ProjectFinanceResource projectFinanceResource = null;
                            if(projectFinance!=null) {
                                projectFinanceResource = projectFinanceMapper.mapToResource(projectFinance);
                                setProjectFinanceDetails(projectFinanceResource, projectFinance.getProject().getApplication().getCompetition());
                            }
                            return projectFinanceResource;
                        }
                );
    }

}