147148149150151152153154
statement.setInt(2, booking.getResourceID()); statement.setInt(3, booking.getProjectID()); statement.setInt(4, booking.getWeek()); statement.executeUpdate(); } catch (SQLException e) { throw new BookingNotFoundException(); } }
161162163164165166167168
statement.setInt(1, booking.getResourceID()); statement.setInt(2, booking.getProjectID()); statement.setInt(3, booking.getWeek()); statement.executeUpdate(); } catch (SQLException e) { throw new BookingNotFoundException(); } }
366367368369370371372373374375376
statement.setInt(2, resourceID); ResultSet result = statement.executeQuery(); if (result.next()) { return result.getFloat("sum"); } else { throw new BookingNotFoundException(); } } catch (SQLException e) { throw new DAOException(); } }