org.apache.chemistry.opencmis.client.api
Interface ItemIterable<T>

Type Parameters:
T - the type of the items
All Superinterfaces:
java.lang.Iterable<T>

public interface ItemIterable<T>
extends java.lang.Iterable<T>

Iterable for CMIS collections that allows ability to skip to specific position or return a subcollection.


Method Summary
 boolean getHasMoreItems()
          Returns whether the repository contains additional items beyond the page of items already fetched.
 ItemIterable<T> getPage()
          Gets an iterable for the current sub collection within the CMIS collection using default maximum number of items
 ItemIterable<T> getPage(int maxNumItems)
          Gets an iterable for the current sub collection within the CMIS collection
 long getPageNumItems()
          Returns the number of items fetched for the current page.
 long getTotalNumItems()
          Returns the total number of items.
 java.util.Iterator<T> iterator()
           
 ItemIterable<T> skipTo(long position)
          Skip to position within CMIS collection
 

Method Detail

skipTo

ItemIterable<T> skipTo(long position)
Skip to position within CMIS collection

Parameters:
position -
Returns:
iterable whose starting point is the specified skip to position. This iterable may be the same as this

getPage

ItemIterable<T> getPage()
Gets an iterable for the current sub collection within the CMIS collection using default maximum number of items

Returns:
iterable for current page

getPage

ItemIterable<T> getPage(int maxNumItems)
Gets an iterable for the current sub collection within the CMIS collection

Parameters:
maxNumItems - maximum number of items the sub collection will contain
Returns:
iterable for current page

iterator

java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>

getPageNumItems

long getPageNumItems()
Returns the number of items fetched for the current page.

Returns:
number of items for currently fetched collection

getHasMoreItems

boolean getHasMoreItems()
Returns whether the repository contains additional items beyond the page of items already fetched.

Returns:
true => further page requests will be made to the repository

getTotalNumItems

long getTotalNumItems()
Returns the total number of items. If the repository knows the total number of items in a result set, the repository SHOULD include the number here. If the repository does not know the number of items in a result set, this parameter SHOULD not be set. The value in the parameter MAY NOT be accurate the next time the client retrieves the result set or the next page in the result set.

Returns:
total number of items or (-1)


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.