In recent Nuxeo versions the session.query method has a signature with
a boolean countTotal that can be set to true, in which case the
returned DocumentModelList will have a totalSize() method that returns
the count.
Florent
On 20 Aug 2009, at 11:55, Stefan Dimov wrote:
Hi,
Thanks for response. The question was about to count functionality
similar to SQL COUNT operator. The purpose is to count documents in
the repository without need to load them. If the count is hundreds
of thousands I'm not sure what will be the performance of the system
- documents are getting loaded (even lazy loaded) and after that
count from the list.
Anyway thanks for suggestion.
Regards,
Stefan
You can do this...
DocumentModelList childList =
coreSession.getChildren(parentDocument.getRef());
long noOfChildDocs = childList.totalSize();
Thanks,
Hari
--
Posted by "hariprashath" at Nuxeo Discussions <http://nuxeo.org/discussions
>
View the complete thread: <http://www.nuxeo.org/discussions/thread.jspa?threadID=2305#8047
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
--
Florent Guillaume, Head of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm