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

Type Parameters:
T -
All Superinterfaces:
Iterable<T>

public interface ItemIterable<T>
extends Iterable<T>

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


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.
 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

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

Iterator<T> iterator()
Specified by:
iterator in interface 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-2010 The Apache Software Foundation. All Rights Reserved.