Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.eindex.page
Class PageIteratorWrapper

    java.lang.Object
      com.stc.eindex.page.PageIteratorWrapper

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AssumedMatchIterator, AuditIterator, EOSearchResultIterator, PotentialDuplicateIterator, TransactionIterator

public abstract class PageIteratorWrapper
extends java.lang.Object
implements java.io.Serializable

The PageIteratorWrapper class is the base wrapper for the page iterator, which is used by the paging mechanism to transmit data to the caller in the form of pages. For example, when a search results in 100 possible matches, the matching record summaries can be sent in groups, or "pages", of 20 rather then sending the whole result set at once.

See Also:
  Serialized Form

Constructor Summary
`PageIteratorWrapper(java.util.ArrayList fullData)` Creates a new instance of the PageIteratorWrapper class that does not maintain the connection to the server.
`PageIteratorWrapper(java.lang.Object[] fullData)` Creates a new instance of the PageIteratorWrapper class that does not maintain the connection to the server.
`PageIteratorWrapper(PageData pageData, int pageSize, int maxElements)` Creates a new instance of the PageIteratorWrapper class that maintains the connection to the server.

Method Summary
`void` | `close()` Frees the allocated resources on the server.
`int` | `count()` Returns the number of records in the iterator.
`int` | `currentPosition()` Returns the current index position of the iterator.
`boolean` | `hasNext()` Checks whether there are more records remaining in the iterator.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PageIteratorWrapper

    public PageIteratorWrapper(java.util.ArrayList fullData)

  Creates a new instance of the PageIteratorWrapper class that does not maintain the connection to the server.

  Parameters:
    `fullData` - An array of all objects in the search result set.
  Throws:
    None.

### PageIteratorWrapper

    public PageIteratorWrapper(java.lang.Object[] fullData)

  Creates a new instance of the PageIteratorWrapper class that does not maintain the connection to the server.

  Parameters:
    `fullData` - An object array of all objects in the search result set.
  Throws:
    None.

### PageIteratorWrapper

    public PageIteratorWrapper(PageData pageData,
                               int pageSize,
                               int maxElements)

  Creates a new instance of the PageIteratorWrapper class that maintains the connection to the server.

  Parameters:
    `pageData` - A handle to the data from the server.
    `pageSize` - The size of each unit of data retrieved from the server.
    `maxElements` - The maximum number of elements to retrieve from the server.
  Throws:
    None.

Method Detail

### close

    public void close()
               throws java.rmi.RemoteException,
                      RemoveException

  Frees the allocated resources on the server.

  Parameters:
    None.
Returns:
  `void` - None.

  Throws:
    `java.rmi.RemoteException` - Thrown if the connection to the server goes down during processing.
    `RemoveException` - Thrown if an error occurs when the method tries to remove an EJB object and the enterprise Bean does not allow it.

### count

    public int count()
              throws PageException,
                     java.rmi.RemoteException

  Returns the number of records in the iterator.

  Parameters:
    None.

  Returns:
    `int` - The number of records in the iterator.
  Throws:
    `PageException` - Thrown if an error occurs while counting the records in the iterator.
    `java.rmi.RemoteException` - Thrown if the connection to the server goes down during processing.

### currentPosition

    public int currentPosition()

  Returns the current index position of the iterator. The position can be from minus one (-1) to one less than the total number of records in the iterator (recordCount - 1).

  Parameters:
    None.

  Returns:
    `int` - The position of the iterator.
  Throws:
    None.

### hasNext

    public boolean hasNext()
                    throws PageException,
                           java.rmi.RemoteException

  Checks whether there are more records remaining in the iterator.

  Parameters:
    None.

  Returns:
    `boolean` - An indicator of whether there are more records in the iterator. This method returns true if there are more records, or false if there are no more records.
  Throws:
    `PageException` - Thrown if an error occurs while checking for additional records in the iterator.
    `java.rmi.RemoteException` - Thrown if the connection to the server goes down during processing.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2007 by Sun Microsystems, Inc. All Rights Reserved.