@Test @SuppressWarnings("unchecked") public void testIterator() { final PageableRepository<Person, String> repo = createMock(PageableRepository.class); expect(repo.list(0, 10, "first", true)).andReturn(Collections.<Person>emptyList()); expect(repo.list(0, 10, "last", false)).andReturn(Collections.<Person>emptyList()); replayAll(); PageableRepositoryDataProvider<Person, String> provider = new PageableRepositoryDataProvider<Person, String>(repo, "first", true); provider.iterator(0, 10); provider.setSort(new SortParam("last", false)); provider.iterator(0, 10); }
public Iterator<? extends E> iterator(long first, long max) { return repository.list((int) first, (int) max, getSort().getProperty(), getSort().isAscending()).iterator(); }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public Iterator<? extends E> iterator(long first, long max) { return repository.list((int) first, (int) max, getSort().getProperty(), getSort().isAscending()).iterator(); } }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public Iterator<? extends E> iterator(long first, long max) { return repository.list((int) first, (int) max, getSort().getProperty(), getSort().isAscending()).iterator(); } PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty);  PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty, boolean ascending); }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public Iterator<? extends E> iterator(long first, long max) { return repository.list((int) first, (int) max, getSort().getProperty(), getSort().isAscending()).iterator(); } PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty);  PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty, boolean ascending); Iterator<? extends E> iterator(long first, long max); IModel<E> model(E entity); long size(); }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public Iterator<? extends E> iterator(long first, long max) { return repository.list((int) first, (int) max, getSort().getProperty(), getSort().isAscending()).iterator(); } PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty);  PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty, boolean ascending); Iterator<? extends E> iterator(long first, long max); IModel<E> model(E entity); long size();  }