Package lib.exceptions

Examples of lib.exceptions.ObjectNotFoundException


  }

  public void update(HealthUnit unit) throws RepositoryException, ObjectNotFoundException {
    int i = getIndex(unit.getId());
    if (i == indice) {
      throw new ObjectNotFoundException("Health unit not found");
    } else {
      vetor[i] = unit;
    }
  }
View Full Code Here


    return ponteiro < indice;
  }

  public IteratorDsk getHealthUnitList() throws RepositoryException, ObjectNotFoundException {
    if (indice == 0)
      throw new ObjectNotFoundException("There isn't registered Health units");
    return new ConcreteIterator(Arrays.asList(vetor));
  }
View Full Code Here

    }

    if (! response.isEmpty()) {
      return new ConcreteIterator(response);
    } else {
      throw new ObjectNotFoundException(
          "There isn't registered health units for the specialty");
    }
  }
View Full Code Here

  public HealthUnit search(Long code) throws RepositoryException, ObjectNotFoundException {
    HealthUnit response = null;
    int i = getIndex(code);
    if (i == indice) {
      throw new ObjectNotFoundException("Health unit not found");
    } else {
      response = vetor[i];
    }
    return response;
  }
View Full Code Here

  }

  public void remove(Long code) throws RepositoryException, ObjectNotFoundException {
    int i = getIndex(code);
    if (i == indice) {
      throw new ObjectNotFoundException("Health unit not found");
    } else {
      vetor[i] = vetor[indice - 1];
      indice = indice - 1;
    }
  }
View Full Code Here

  public void update(DiseaseType tp) throws RepositoryException, ObjectNotFoundException,
      ObjectNotValidException {
    int i = getIndex(tp.getId());
    if (i == indice) {
      throw new ObjectNotFoundException("Disease not found");
    } else {
      vetor[i] = tp;
    }
  }
View Full Code Here

  public DiseaseType search(Long code) throws RepositoryException, ObjectNotFoundException {
    DiseaseType response = null;
    int i = getIndex(code);
    if (i == indice) {
      throw new ObjectNotFoundException("Disease not found");
    } else {
      response = vetor[i];
    }
    return response;
  }
View Full Code Here

  }

  public void remove(Long code) throws RepositoryException, ObjectNotFoundException {
    int i = getIndex(code);
    if (i == indice) {
      throw new ObjectNotFoundException("Disease not found");
    } else {
      vetor[i] = vetor[indice - 1];
      indice = indice - 1;
    }
  }
View Full Code Here

  public void update(Employee employee) throws ObjectNotFoundException {
    synchronized (this) {
      int i = getIndex(employee.getLogin());
      if (i == index) {
        throw new ObjectNotFoundException("Employee not found");
      } else {
        vector[i] = employee;
      }
    }
  }
View Full Code Here

  public Employee search(String login) throws ObjectNotFoundException {
    synchronized (this) {
      Employee response = null;
      int i = getIndex(login);
      if (i == index) {
        throw new ObjectNotFoundException("Employee not found");
      } else {
        response = vector[i];
      }
      return response;
    }
View Full Code Here

TOP

Related Classes of lib.exceptions.ObjectNotFoundException

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.