124125126127128129130131132
ResultSet result = statement.executeQuery(); while (result.next()) { projects.add(getProjectFromResult(result)); } } catch (SQLException e) { throw new DAOException(); } return projects; }
140141142143144145146147148
176177178179180181182183184185
while (result.next()) { projects.add(getProjectFromResult(result)); } } catch (SQLException e) { throw new DAOException(); } return projects; }
199200201202203204205206207208
218219220221222223224225226227
239240241242243244245246247
258259260261262263264265266
272829303132333435
user = getUserFromResult(result); } else { throw new UserNotFoundException(); } } catch (SQLException e) { throw new DAOException(); } return user; }
474849505152535455
96979899100101102103
PreparedStatement statement = JdbcConnection.getConnection() .prepareStatement(command); statement.setInt(1, user.getUserID()); statement.executeUpdate(); } catch (SQLException e) { throw new DAOException(); } }