jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Nebolsin" <nebol...@prophotos.ru>
Subject Why ObjectIterator from Jackrabbit OCM doesn't implement RangeIterator?
Date Wed, 17 Sep 2008 10:48:47 GMT
Hi all.
I'm writing JCR/Jackrabbit plugins for the Grails framework (
http://grails.org) and I have a question regarding Jacrabbit OCM module.

Trying to implement db-like pagination feature (using limit/offset in the
query) I discovered, that there's no analog for this feature in Jackrabbit
OCM. It would be easy to simulate this feature by skipping several results
in ObjectIterator, but ObjectIterator doesn't implement RangeIterator
interface. The only way I found is to call next() method several times, but
in this case ObjectIterator performs (Node -> Java) binding for each skipped
result, so performance is poor.

Is there any reason, why ObjectIterator doesn't implement RangeIterator
interface?

I created a very small and simple patch for ObjectIterator, delegating all
methods from RangeIterator to underlying NodeIterator, and it seems to work
fine (at least all tests are passed).

Should I raise a Jira issue and attach the patch?

Cheers

-- 
Sergey Nebolsin
Principal Software Engineer, Prophotos.ru

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message