Package lib.exceptions

Examples of lib.exceptions.ObjectNotFoundException


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


            if (resultSet.next()) {
              symptom = new Symptom(resultSet.getString("descricao"));
              symptom.setId((new Long(resultSet.getString("codigo"))).longValue());

            } else {
                throw new ObjectNotFoundException(ExceptionMessages
                    .EXC_FALHA_PROCURA);
            }
            resultSet.close();
            stmt.close();
View Full Code Here

      // Caso nao existam uma excecao eh lancada.
            if (rs.next()) {
                symptom = search((new Long(rs.getString("codigo"))).longValue());
                listaSymptom.add(symptom);
            } else {
                throw new ObjectNotFoundException(ExceptionMessages
                    .EXC_FALHA_PROCURA);
            }

            // O resultado da query eh navegado, e cada
            // codigo ehinformado a um metodo (procura) que
View Full Code Here

  public void update(Complaint q) throws RepositoryException, ObjectNotFoundException {
    synchronized (this) {
      int i = getIndex(q.getCodigo());
      if (i == indice) {
        throw new ObjectNotFoundException("Complaint not found");
      } else {
        vetor[i] = q;
      }
    }
  }
View Full Code Here

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

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

  }

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

  public Symptom search(Long code) throws RepositoryException, ObjectNotFoundException {
    Symptom response = null;
    int i = getIndex(code);
    if (i == indice) {
      throw new ObjectNotFoundException("Symptom 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("Symptom not found");
    } else {
      vetor[i] = vetor[indice - 1];
      indice = indice - 1;
    }
  }
View Full Code Here

  public void update(MedicalSpeciality specialty) throws RepositoryException,
      ObjectNotFoundException {
    int i = getIndex(specialty.getId());
    if (i == indice) {
      throw new ObjectNotFoundException("Specialty not found");
    } else {
      vetor[i] = specialty;
    }
  }
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.