class InternalUserProjectStatusServiceImpl extends AbstractProjectServiceImpl implements InternalUserProjectStatusService {

    @Override
    @Transactional //Write transaction for first time creation of project finances.
    public ServiceResult<ProjectStatusPageResource> getCompetitionStatus(long competitionId,
                                                                         String applicationSearchString,
                                                                         int page,
                                                                         int size) {
        Page<Project> result = projectRepository.searchByCompetitionIdAndApplicationIdLike(competitionId, applicationSearchString, PageRequest.of(page, size));
        return serviceSuccess(new ProjectStatusPageResource(result.getTotalElements(), result.getTotalPages(),
                getProjectStatuses(result::getContent), result.getNumber(), result.getSize()));
    }

}