org.apache.jackrabbit.ocm.manager.impl
Class ObjectIterator

java.lang.Object
  extended by org.apache.jackrabbit.ocm.manager.impl.ObjectIterator
All Implemented Interfaces:
Iterator

public class ObjectIterator
extends Object
implements Iterator

ObjectIterator is a wrapper class for JCR NodeIterator, which returns mapped objects. Note, though, that this iterator may not return the same number of objects as the underlying node iterator as not all nodes may successfully be mapped to objects. Any problems mapping nodes to objects are logged at INFO level.

This Iterator implementation does not support removing elements, therefore the remove() method throws a UnsupportOperationException.

Author:
Christophe Lombart

Constructor Summary
ObjectIterator(NodeIterator iterator, ObjectConverter converter, Session session)
          Constructor
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectIterator

public ObjectIterator(NodeIterator iterator,
                      ObjectConverter converter,
                      Session session)
Constructor

Parameters:
iterator - JCR node iterator
converter - The object converter
session - the JCR session
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator


Copyright © 2004-2008 Apache Software Foundation. All Rights Reserved.