class CompetitionSetupServiceImpl extends BaseTransactionalService implements CompetitionSetupService {

    @Override
    @Transactional
    public ServiceResult<Void> deleteCompetition(long competitionId) {
        return getCompetition(competitionId).andOnSuccess(competition ->
                deletePublicContentForCompetition(competition).andOnSuccess(() -> {
                    deleteFormValidatorsForCompetitionQuestions(competition);
                    deleteMilestonesForCompetition(competition);
                    deleteInnovationLead(competition);
                    deleteAllStakeholders(competition);
                    deleteSetupStatus(competition);
                    competitionRepository.delete(competition);
                    return serviceSuccess();
                }));
    }

}