int countOfParticipants = intactContext.getDaoFactory().getInteractorDao().countComponentsForInteractorWithAc(child.getAc()); if (countOfParticipants > 0){ throw new IntactObjectDeleteException("The interactor " + child.getAc() + " cannot be deleted because it is still used in " + countOfParticipants + " participants."); int countOfInteractors = intactContext.getDaoFactory().getInteractorDao().getByBioSourceAc(child.getAc()).size(); if ( countOfInteractors > 0){ throw new IntactObjectDeleteException("The bioSource " + child.getAc() + " cannot be deleted because it is still used in " + countOfInteractors + " interactors."); throw new IntactObjectDeleteException("The bioSource " + child.getAc() + " cannot be deleted because it is still used in " + countOfExpressedIn + " participants as expressed in organism."); throw new IntactObjectDeleteException("The bioSource " + child.getAc() + " cannot be deleted because it is still used in " + countExperiments + " experiments.");
int countOfParticipants = intactContext.getDaoFactory().getInteractorDao().countComponentsForInteractorWithAc(child.getAc()); if (countOfParticipants > 0){ throw new IntactObjectDeleteException("The interactor " + child.getAc() + " cannot be deleted because it is still used in " + countOfParticipants + " participants."); int countOfInteractors = intactContext.getDaoFactory().getInteractorDao().getByBioSourceAc(child.getAc()).size(); if ( countOfInteractors > 0){ throw new IntactObjectDeleteException("The bioSource " + child.getAc() + " cannot be deleted because it is still used in " + countOfInteractors + " interactors."); throw new IntactObjectDeleteException("The bioSource " + child.getAc() + " cannot be deleted because it is still used in " + countOfExpressedIn + " participants as expressed in organism."); throw new IntactObjectDeleteException("The bioSource " + child.getAc() + " cannot be deleted because it is still used in " + countExperiments + " experiments.");