public int size() {
   if (size == null) {
     size = provider.fetchResultCount();
   }
   return size;
 }
 public Iterator<? extends T> iterator(int first, int count) {
   Paginator paginator = new DefaultPaginator();
   paginator.setFirstResult(first);
   paginator.setMaxRows(count);
   return provider.fetchResults(paginator).iterator();
 }