[ 
https://jira.nuxeo.org/browse/NXP-4799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=70891#action_70891
 ] 

Florent Guillaume commented on NXP-4799:
----------------------------------------

First, the session.queryIt() methods are deprecated.This means that 
DocumentModelIterator itself is deprecated.

You should use query() instead. The returned DocumentModelList has a 
getTotalSize() method that is efficient and probably does what you need.

I'll do a fix but in general it's not possible to know the full size without 
going to the end of the iterator which defeats the purpose, so 
DocumentModelIterator.UNKNOWN_SIZE may be returned if there's more than one 
page.

queryAndFetch() can be used as well, the IterableQueryResult will be expanded 
soon behave more like a cursor.

> DocumentModelIteratorImpl.size() should return number of elements (as 
> described in interface's javadoc), not maximum of elements
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NXP-4799
>                 URL: https://jira.nuxeo.org/browse/NXP-4799
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>    Affects Versions: 5.3.1
>            Reporter: Vincent Dutat
>            Assignee: Florent Guillaume
>         Attachments: DocumentModelIteratorWithFilterTest.java
>
>
> see method size() here 
> http://hg.nuxeo.org/nuxeo/nuxeo-core/file/c524c48db4aa/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/impl/DocumentModelIteratorImpl.java

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to