org.norther.tammi.root.hbm.query
Class ScrollIteratorAdapter<E>

java.lang.Object
  extended by org.norther.tammi.root.hbm.query.ScrollIteratorAdapter<E>
Type Parameters:
E - the element type.
All Implemented Interfaces:
Iterator<E>, QueryIterator<E>

public class ScrollIteratorAdapter<E>
extends Object
implements QueryIterator<E>

A scrollable query iterator adapter.

Version:
$Id: ScrollIteratorAdapter.java,v 1.4 2009/09/28 15:08:35 cvsimp Exp $
Author:
Ilkka Priha

Constructor Summary
ScrollIteratorAdapter(ScrollableResults r, Persister p, boolean s)
          Constructs a new iterator.
 
Method Summary
 boolean equals(Object o)
           
protected  ScrollableResults getScrollable()
          Gets the scrollable adaptee.
 int hashCode()
           
 boolean hasNext()
           
 boolean isRefreshed()
          Checks whether refreshed.
 E next()
           
 void release()
          Releases resources of this iterator.
 void remove()
           
 void setRefreshed(boolean flag)
          Sets whether refreshed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollIteratorAdapter

public ScrollIteratorAdapter(ScrollableResults r,
                             Persister p,
                             boolean s)
Constructs a new iterator.

Parameters:
r - a scrollable to wrap.
p - the persister.
s - the scalar option.
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<E>

next

public E next()
Specified by:
next in interface Iterator<E>

remove

public void remove()
Specified by:
remove in interface Iterator<E>

isRefreshed

public boolean isRefreshed()
Description copied from interface: QueryIterator
Checks whether refreshed.

Specified by:
isRefreshed in interface QueryIterator<E>
Returns:
true if refreshed, false otherwise.

setRefreshed

public void setRefreshed(boolean flag)
Description copied from interface: QueryIterator
Sets whether refreshed. A refreshed iterator refreshes references of each element before returning it.

Specified by:
setRefreshed in interface QueryIterator<E>
Parameters:
flag - true if refreshed, false otherwise.

release

public void release()
Description copied from interface: QueryIterator
Releases resources of this iterator.

Specified by:
release in interface QueryIterator<E>

getScrollable

protected ScrollableResults getScrollable()
Gets the scrollable adaptee.

Returns:
the wrapped scrollable.


Copyright © 2004 The Norther Organization. All rights reserved.