@Override public Reclamacion obtenerPorID(Object object) throws Exception { if (!(object instanceof Reclamacion)) { throw new Exception("Esta intentando obtener un Vale con un objeto invalido"); } Reclamacion m = new Reclamacion(); Documento d = (new DocumentoDAO()).obtenerPorID(m); PreparedStatement ps = getConnection().prepareStatement(SELECT_BY_ID_SQL); ps.setInt(1, ((Reclamacion) object).getId()); ResultSet rs = ps.executeQuery(); while (rs.next()) { m.setDatosReales(rs.getString(2)); } m.setDatosFactura(d.getDatosFactura()); m.setFecha(d.getFecha()); m.setTrabajadorUsuario(d.getTrabajadorUsuario()); m.setId(d.getId()); return m; }