Skip to content

Conversation

@njr-11
Copy link
Member

@njr-11 njr-11 commented Oct 30, 2024

Javadoc has a section about pagination which has an example method

* Product[] findByNameLike(String pattern, PageRequest pageRequest, Order<Product> order);

that is supposed to be used for the following example usage pattern,

 * page1 = products.findByNameLikeAndPriceBetween(
 *                 namePattern, minPrice, maxPrice, page1Request,
 *                 Order.by(Sort.desc("price"), Sort.asc("id"));

The two are inconsistent. The methods have different names and accept a different number of parameters.

This PR updates them to match so that the example will make more sense.

Signed-off-by: Nathan Rauh <nathan.rauh@us.ibm.com>
@njr-11 njr-11 added the documentation Improvements or additions to documentation label Oct 30, 2024
* float minPrice,
* float maxPrice,
* PageRequest pageRequest,
* Order&lt;Product&gt; order);
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI - Here is the example in the Javadoc that this is supposed to correspond to:

 * page1 = products.findByNameLikeAndPriceBetween(
 *                 namePattern, minPrice, maxPrice, page1Request,
 *                 Order.by(Sort.desc("price"), Sort.asc("id"));

@njr-11 njr-11 merged commit a04b851 into jakartaee:main Oct 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants