@Test @SuppressWarnings("unchecked") public void testModel() { final PageableRepository<Person, String> repo = createMock(PageableRepository.class); replayAll(); PageableRepositoryDataProvider<Person, String> provider = new PageableRepositoryDataProvider<Person, String>(repo, "first", true); final Person p = new Person(); IModel<Person> model = provider.model(p); assertSame(model.getObject(), p); assertTrue(model instanceof LoadableDetachableEntityModel); }
public IModel<E> model(E entity) { return new LoadableDetachableEntityModel<E, I>(repository, entity); }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public IModel<E> model(E entity) { return new LoadableDetachableEntityModel<E, I>(repository, entity); } }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public IModel<E> model(E entity) { return new LoadableDetachableEntityModel<E, I>(repository, entity); } PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty);  PageableRepositoryDataProvider(PageableRepository<E, I> repository, String sortProperty, boolean ascending); }
PageableRepositoryDataProvider extends
        SortableDataProvider<E, String> { public IModel<E> model(E entity) { return new LoadableDetachableEntityModel<E, I>(repository, entity); } 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 IModel<E> model(E entity) { return new LoadableDetachableEntityModel<E, I>(repository, entity); } 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();  }