Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to code examples in jdoc and spec #590

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

gavinking
Copy link
Contributor

No description provided.

CursoredPage<Car> find(@By(_Car.make) String manufacturer,
@By(_Car.model) String model,
PageRequest<Car> pageRequest);
@Find
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 was missing @Find

* while (page.hasNext()) {
* page = people.inAgeRange(35, 59,
* page.nextPageRequest().withoutTotal());
* results = page.content();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 this code didn't even compile

@gavinking gavinking marked this pull request as ready for review March 25, 2024 19:32
Copy link
Contributor

@njr-11 njr-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting the bugs in the examples. One of them went too far and used a feature isn't in Jakarta Data yet so I added suggestions to restore that one to Query by Method Name.

api/src/main/java/jakarta/data/page/PageRequest.java Outdated Show resolved Hide resolved
api/src/main/java/jakarta/data/page/PageRequest.java Outdated Show resolved Hide resolved
api/src/main/java/jakarta/data/page/PageRequest.java Outdated Show resolved Hide resolved
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
@gavinking
Copy link
Contributor Author

I applied your suggestions.

.pageSize(10)
.afterKey(priceMidpoint, 0L);
CursoredPage<Product> moreExpensive = products.findByNameLike(pattern, pageRequest);
PageRequest<Product> pageRequest =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@otaviojava otaviojava merged commit 967ebf8 into jakartaee:main Mar 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants