org.melati.poem
Class ResultSetEnumeration<T>

Package class diagram package ResultSetEnumeration
java.lang.Object
  extended by org.melati.poem.ResultSetEnumeration<T>
All Implemented Interfaces:
Enumeration<T>, SkipEnumeration<T>
Direct Known Subclasses:
TailoredResultSetEnumeration

public abstract class ResultSetEnumeration<T>
extends Object
implements SkipEnumeration<T>

An Enumeration created by filtering a ResultSet according to an abstract function applied to each element of the ResultSet.

Implementations must provide mapped(ResultSet).


Constructor Summary
ResultSetEnumeration(ResultSet resultSet)
          Constructor.
 
Method Summary
 boolean hasMoreElements()
          
protected abstract  Object mapped(ResultSet resultSetP)
           
 T nextElement()
          Return the next element.
 void skip()
          Skip an Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetEnumeration

public ResultSetEnumeration(ResultSet resultSet)
Constructor.

Parameters:
resultSet - the ResultSet property
Method Detail

hasMoreElements

public boolean hasMoreElements()

Specified by:
hasMoreElements in interface Enumeration<T>
See Also:
Enumeration.hasMoreElements()

mapped

protected abstract Object mapped(ResultSet resultSetP)
                          throws SQLException,
                                 NoSuchRowPoemException
Throws:
SQLException
NoSuchRowPoemException

nextElement

public T nextElement()
              throws NoSuchElementException
Return the next element.

NOTE A RowDisappearedPoemException might be thrown but does not prevent subsequent use of the object.

Specified by:
nextElement in interface Enumeration<T>
Throws:
NoSuchElementException
See Also:
Enumeration.nextElement()

skip

public void skip()
          throws NoSuchElementException
Skip an Element.

Specified by:
skip in interface SkipEnumeration<T>
Throws:
NoSuchElementException - if there are no more Elements
See Also:
SkipEnumeration.skip()


Copyright © 2000-2010 PanEris. All Rights Reserved.