public List<Category> getAllChosenCategories(int userId) { try (Connection connection = PoolConnection.getConnection()) { return udao.getAllChosen(connection, userId); } catch (SQLException e) { e.printStackTrace(); } return null; }