setting page control

John Mazzitelli mazz at redhat.com
Fri Mar 4 21:30:36 UTC 2011


yes, that would be best - put it in the superclass.

I wrote up a bz on this: https://bugzilla.redhat.com/show_bug.cgi?id=682304

On 03/04/2011 04:26 PM, Ian Springer wrote:
> Nice catch. We should see if there's a way to move this up into
> RPCDataSource.transformRequest() so it's take care of by the base class,
> and subclasses don't have to remember to do it. Perhaps add:
>
>      protected abstract C getFetchCriteria(final DSRequest request)
>
> to RPCDataSource and then transformRequest() could do:
>
>      C criteria = getFetchCriteria(request);
>      executeFetch(request, response, criteria);   // note, the signature
> change
>
> or something along those lines..
>
> On 03/04/2011 02:35 PM, John Mazzitelli wrote:
>> I just noticed something yesterday and I wanted to bring it up because I
>> think there may problem(s) for large datasets.
>>
>> I noticed in some DataSource implementations of ours, in our
>> executeFetch() methods, we aren't setting the page control in the
>> criteria... like this:
>>
>>       criteria.setPageControl(getPageControl(request));
>>
>> without setting that, I think we are always going to only get back to
>> top 200 rows (since that's the default page control). Which means if we
>> are paging or sorting, if I read this code right, it won't actually get
>> us the right data.
>>
>> So, we need to scour the source code, look at all executeFetch impls and
>> make sure we are setting the page control properly. I think if we don't
>> do this, its not gonna work right for datasets larger than 200.
>> _______________________________________________
>> rhq-devel mailing list
>> rhq-devel at lists.fedorahosted.org
>> https://fedorahosted.org/mailman/listinfo/rhq-devel
>
>


More information about the rhq-devel mailing list