/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public Sample getSampleByName(String sampleName) { for (Sample sample : getSample()) { if (sample.getName().equals(sampleName)) { return sample; } } throw new NotFoundException("Sample '" + sampleName + "' is not available."); }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public Sample getSampleById(String sampleId) { for (Sample sample : getSample()) { if (sample.getSampleID().equals(sampleId)) { return sample; } } throw new NotFoundException("Sample with ID '" + sampleId + "' is not available."); }