Package lib.exceptions

Examples of lib.exceptions.RepositoryException


      rs.close();
      stmt.close();
    } catch (PersistenceMechanismException e) {
      e.printStackTrace();
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_BD);
    } catch (SQLException e) {
      e.printStackTrace();
      throw new SQLPersistenceMechanismException(ExceptionMessages.EXC_FALHA_BD,sql);
    }
    return new ConcreteIterator(listatd);
View Full Code Here


                stmt.executeUpdate(sql);
                stmt.close();
            } catch (SQLException e) {
                throw new SQLPersistenceMechanismException(e.getMessage(),sql);
            } catch (PersistenceMechanismException e) {
                throw new RepositoryException(e.getMessage());
            } finally {
                try {
                    mp.releaseCommunicationChannel();
                } catch (PersistenceMechanismException e) {
                    throw new RepositoryException(e.getMessage());
                }
            }
        } else {
            throw new ObjectNotValidException(ExceptionMessages.EXC_NULO);
        }
View Full Code Here

      td.setManifestation(manifestacao);
      td.setDuration(duracao);
      td.setId(codigo);

    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(e.getMessage());
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(e.getMessage(),sql);
    } finally {
      try {
        mp.releaseCommunicationChannel();
      } catch (PersistenceMechanismException e) {
        throw new RepositoryException(e.getMessage());
      } catch (RepositoryException e) {
        // TODO Auto-generated catch block
        throw e;
      }
    }
View Full Code Here

      td = new DiseaseType(nome, descricao, manifestacao, duracao, sintomas);
      td.setId(code);

    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_BD);
    } catch (SQLException e) {
      e.printStackTrace();
      throw new SQLPersistenceMechanismException(ExceptionMessages.EXC_FALHA_BD,sql);
    }
   
View Full Code Here

      Statement stmt = (Statement) this.mp.getCommunicationChannel();
      stmt.executeUpdate(sql);
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_BD);
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(ExceptionMessages.EXC_FALHA_BD,sql);
    }
  }
View Full Code Here

      Statement stmt = (Statement) this.mp.getCommunicationChannel();
      stmt.executeUpdate(sql);
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_BD);
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(ExceptionMessages.EXC_FALHA_BD,sql);
    }
  }
View Full Code Here

      }
      Statement stmt = (Statement) this.mp.getCommunicationChannel();
      stmt.executeUpdate(sql);
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_BD);
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(ExceptionMessages.EXC_FALHA_BD,sql);
    }
  }
View Full Code Here

            + code);
      }
      rs.close();
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_PROCURA);
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(ExceptionMessages.EXC_FALHA_PROCURA,sql);
    }

    // Dependendo do tipo da queixa o acesso aos dados � feito
View Full Code Here

      rs.close();
      stmt.close();
    } catch (PersistenceMechanismException e) {
      e.printStackTrace();
      throw new RepositoryException("PersistenceMechanismException: " + e.getMessage());
    } catch (SQLException e) {
      e.printStackTrace();
      throw new SQLPersistenceMechanismException("SQLException: " + e.getMessage(),sql);
    } catch (RepositoryException e) {
      e.printStackTrace();
      throw new RepositoryException("SQLException: " + e.getMessage());
    }

    return new ConcreteIterator(cList);
  }
View Full Code Here

        listatd.add(us);
        ids.remove(0);
      }
      pm.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(ExceptionMessages.EXC_FALHA_PROCURA);
    } finally {
      try {
        mp.releaseCommunicationChannel();
      } catch (PersistenceMechanismException e) {
        throw new RepositoryException(e.getMessage());
      }
    }
    // O retorno desse m�todo � uma estrutura que permite a
    // itera��o nos elementos
    return new ConcreteIterator(listatd);
View Full Code Here

TOP

Related Classes of lib.exceptions.RepositoryException

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.