com.beasys.commerce.ebusiness.catalog
Interface ViewIterator

All Known Implementing Classes:
CatalogItemIterator, CategoryItemIterator, CategoryIterator, OrphanedItemIterator, ProductItemIterator, SearchItemIterator, SiblingIterator, SubCategoryIterator

public interface ViewIterator

A ViewIterator is an iterator over large result sets that are broken into a series of Views.

See Also
View

Method Summary
 View getCurrentView()
          Returns the current view.
 View getViewAt(int index)
          Gets the view at the specified index.
 int getViewCount()
          Returns the number of views spanned by this iterator.
 void gotoNextView()
          Moves the iterator to the next view.
 void gotoPreviousView()
          Moves the iterator to the previous view.
 void gotoViewAt(int index)
          Moves the iterator to the view at the specified index.
 boolean hasNext()
          Returns true if the iterator has more elements.
 boolean hasNextView()
          Returns true if the iterator has a next view.
 boolean hasPreviousView()
          Returns true if the iterator has a previous view.
 Object next()
          Returns the next element in the iteration.
 int size()
          Returns the number of objects over which the iterator spans.
 

Method Detail

size

int size()
Returns the number of objects over which the iterator spans. This number is guaranteed to only be accurate at the time of iterator creation.

Returns
The number of spanned objects.

hasNext

boolean hasNext()
Returns true if the iterator has more elements.

Returns
true if the iterator has more elements.

next

Object next()
            throws NoSuchElementException,
                   RemoteException
Returns the next element in the iteration.

Returns
the next element in the iteration.
Throws
RemoteException - on remote error.
NoSuchElementException - if the iteration has no more elements.

getViewCount

int getViewCount()
Returns the number of views spanned by this iterator.

Returns
the number of views spanned by this iterator.

getCurrentView

View getCurrentView()
Returns the current view.

Returns
The current view.

getViewAt

View getViewAt(int index)
               throws IndexOutOfBoundsException
Gets the view at the specified index.

Parameters
index - The index of the desired view.
Returns
The view at the specified index.
Throws
IndexOutOfBoundsException - if the index is invalid.

hasNextView

boolean hasNextView()
Returns true if the iterator has a next view.

Returns
true if the iterator has a next view.

hasPreviousView

boolean hasPreviousView()
Returns true if the iterator has a previous view.

Returns
true if the iterator has a previous view.

gotoNextView

void gotoNextView()
                  throws NoSuchViewException
Moves the iterator to the next view.

Throws
NoSuchViewException - if the iterator does not have a next view.

gotoPreviousView

void gotoPreviousView()
                      throws NoSuchViewException
Moves the iterator to the previous view.

Throws
NoSuchViewException - if the iterator does not have a previous view.

gotoViewAt

void gotoViewAt(int index)
                throws NoSuchViewException
Moves the iterator to the view at the specified index.

Parameters
index - The index of the desired view.
Throws
NoSuchViewException - if the index is invalid.


Copyright © 2006 BEA Systems, Inc. All Rights Reserved