© 2005 BEA Systems, Inc.

com.beasys.commerce.ebusiness.catalog
Interface ViewIterator

All Known Implementing Classes:
CatalogItemIterator

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

getCurrentView

public View getCurrentView()
Returns the current view.

Returns:
The current view.

getViewAt

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

getViewCount

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

Returns:
the number of views spanned by this iterator.

gotoNextView

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

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

gotoPreviousView

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

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

gotoViewAt

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

hasNext

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

Returns:
true if the iterator has more elements.

hasNextView

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

Returns:
true if the iterator has a next view.

hasPreviousView

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

Returns:
true if the iterator has a previous view.

next

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

size

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

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved