Package lib.exceptions

Examples of lib.exceptions.RepositoryException


      Statement stmt = (Statement) this.pm.getCommunicationChannel();
      stmt.executeUpdate(sql);
      stmt.close();

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


        throw new ObjectNotFoundException(ExceptionMessages.EXC_FALHA_PROCURA);
      }
      resultSet.close();
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(e.getMessage());
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(e.getMessage(),sql);
    }
    return employee;
  }
View Full Code Here

      resultSet = stmt.executeQuery(sql);
      response = resultSet.next();
      resultSet.close();
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(e.getMessage());
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(e.getMessage(),sql);
    }
    return response;
  }
View Full Code Here

          + employee.getName() + "' where login='" + employee.getLogin() + "'";
      Statement stmt = (Statement) this.pm.getCommunicationChannel();
      stmt.executeUpdate(sql);
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(e.getMessage());
    } catch (SQLException e) {
      throw new SQLPersistenceMechanismException(e.getMessage(),sql);
    }
  }
View Full Code Here

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

            resultSet  = stmt.executeQuery(sql);
            response = resultSet.next();
            resultSet.close();
            stmt.close();           
        } catch (PersistenceMechanismException e) {
            throw new RepositoryException(e.getMessage());
        } catch (SQLException e) {
            throw new SQLPersistenceMechanismException(e.getMessage(),sql);
        }
        return response;
  }
View Full Code Here

        listaUs.add(us);
      }
      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);
    } 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(listaUs);
View Full Code Here

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

        listaUS.add(us);
      }
      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);
    } 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(listaUS);
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

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.