Package com.iggroup.oss.sample.domain.exception

Examples of com.iggroup.oss.sample.domain.exception.ReferenceNotFoundException


   public Sample loadSample(String reference) {

      Sample sample = database.get(reference);

      if (sample == null) {
         throw new ReferenceNotFoundException(reference);
      }
      return sample;

   }
View Full Code Here


    *
    * @param reference the reference of the sample to be deleted
    */
   public void deleteSample(String reference) {
      if (!database.containsKey(reference)) {
         throw new ReferenceNotFoundException(reference);
      }
      database.remove(reference);
   }
View Full Code Here

    *
    * @param sample the updated sample
    */
   public void updateSample(Sample sample) {
      if (!database.containsKey(sample.getReference())) {
         throw new ReferenceNotFoundException(sample.getReference());
      }
      database.put(sample.getReference(), sample);
   }
View Full Code Here

TOP

Related Classes of com.iggroup.oss.sample.domain.exception.ReferenceNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.