Add getItemAt(int rowIndex) method to DataProvider
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
DataProvider lacks a method to get Nth item. The implementation should be quite straightforward, something like:
public T getItemAt(int rowIndex) {
Query<T,SerializablePredicate<T>> query = new Query<T,SerializablePredicate<T>>(rowIndex,1,null,null,null);
Stream<T> result = dataProvider.fetch((Query<T, SerializablePredicate<T>>) query);
T myBean = result.findFirst().get();
return myBean;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the DataProvider entry point and inspect the Query and fetch APIs used in the issue description. Add the requested getItemAt(int rowIndex) behavior so it returns the item at the requested row, then verify the result with the relevant existing DataProvider tests, if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100