Examples of BaseExcepcion


Examples of upc.iluminados.excepcion.BaseExcepcion

                vo.setApellidoPaterno(rs.getString(3));
                vo.setApellidoMaterno(rs.getString(4));
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                vo.setApellidoMaterno(rs.getString(4));
              vo.setTipo(rs.getInt(5));
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

            if (i != 1) {
                throw new SQLException("No se pudo insertar");
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
    }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                vo.setDireccion(rs.getString(4));
                vo.setTelefono(rs.getString(5));
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                vo.setTelefono(rs.getString(5));
                lista.add(vo);
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                stmt.setDouble(2, vo.getTarifaDiurna());
                stmt.setDouble(3, vo.getTarifaNocturna());
                stmt.setInt(4, vo.getLocal().getId());
                int i = stmt.executeUpdate();
                if (i != 1) {
                    throw new BaseExcepcion("Error al insertar cancha");
                }
                keys = stmt.getGeneratedKeys();
                keys.next();
                idCancha = keys.getInt(1);
                vo.setId(idCancha);

            } catch (SQLException e) {
                System.err.println(e.getMessage());
                throw new BaseExcepcion(e.getMessage());
            } finally {
                this.cerrarResultSet(keys);
                this.cerrarStatement(stmt);
            }

            //Insertar horario
            query = "INSERT INTO tb_horariocancha(dia, hora,idCancha) VALUES (?,?,?)";
            for (HorarioCancha hc : lista) {
                try {
                    stmt = con.prepareStatement(query);
                    stmt.setString(1, hc.getDia());
                    stmt.setString(2, hc.getHora());
                    stmt.setInt(3, idCancha);
                    int i = stmt.executeUpdate();
                    if (i != 1) {
                        throw new BaseExcepcion("Error al insertar horario");
                    }
                } catch (SQLException e) {
                    System.err.println(e.getMessage());
                    throw new BaseExcepcion(e.getMessage());
                } finally {
                    this.cerrarStatement(stmt);
                }

            }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                vo.setTarifaDiurna(rs.getDouble(3));
                vo.setTarifaNocturna(rs.getDouble(4));
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                lista.add(vo);
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

                throw new SQLException("No se pudo insertar");
            }
        } catch (SQLException e) {
          e.printStackTrace();
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
    }
View Full Code Here

Examples of upc.iluminados.excepcion.BaseExcepcion

            if (rs.next()) {
                vo = new AlquilerCancha();
            }
        } catch (SQLException e) {
            System.err.println(e.getMessage());
            throw new BaseExcepcion(e.getMessage());
        } finally {
            this.cerrarResultSet(rs);
            this.cerrarStatement(stmt);
            this.cerrarConexion(con);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.