statement.setInt(2, resource.getResourceID());
ResultSet result = statement.executeQuery();
if (result.next()) {
booking = getBookingFromResult(result);
} else {
throw new ResourceNotBookedException();
}
} catch (SQLException e) {
throw new DAOException();
}
return booking;