|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.LazyItemIterator
public class LazyItemIterator
LazyItemIterator is an id-based iterator that instantiates
the Items only when they are requested.
Items that appear to be nonexistent
for some reason (e.g. because of insufficient access rights or because they
have been removed since the iterator has been retrieved) are silently
skipped. As a result the size of the iterator as reported by
getSize() always returns -1.
| Constructor Summary | |
|---|---|
LazyItemIterator(ItemManager itemMgr,
HierarchyManager hierarchyMgr,
java.util.Iterator itemIds)
Creates a new LazyItemIterator instance. |
|
LazyItemIterator(ItemManager itemMgr,
java.util.Iterator hierarchyEntryIterator)
Creates a new LazyItemIterator instance. |
|
| Method Summary | |
|---|---|
long |
getPosition()
|
long |
getSize()
Returns the number of Items in this iterator or -1 if the
size is unkown. |
boolean |
hasNext()
|
java.lang.Object |
next()
|
javax.jcr.Node |
nextNode()
|
javax.jcr.Property |
nextProperty()
|
javax.jcr.version.Version |
nextVersion()
|
void |
remove()
|
void |
skip(long skipNum)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LazyItemIterator(ItemManager itemMgr,
java.util.Iterator hierarchyEntryIterator)
LazyItemIterator instance.
itemMgr - item managerhierarchyEntryIterator - Iterator over HierarchyEntries
public LazyItemIterator(ItemManager itemMgr,
HierarchyManager hierarchyMgr,
java.util.Iterator itemIds)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
LazyItemIterator instance.
itemMgr - hierarchyMgr - itemIds -
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException| Method Detail |
|---|
public javax.jcr.Node nextNode()
nextNode in interface javax.jcr.NodeIteratorNodeIterator.nextNode()public javax.jcr.Property nextProperty()
nextProperty in interface javax.jcr.PropertyIteratorPropertyIterator.nextProperty()public javax.jcr.version.Version nextVersion()
nextVersion in interface javax.jcr.version.VersionIteratorVersionIterator.nextVersion()public long getPosition()
getPosition in interface javax.jcr.RangeIteratorRangeIterator.getPosition()public long getSize()
Items in this iterator or -1 if the
size is unkown.
Note: The number returned by this method may differ from the number
of Items actually returned by calls to hasNext() / getNextNode().
This is caused by the lazy instantiation behaviour of this iterator,
that may detect only upon iteration that an Item has been invalidated
or removed in the mean time. As soon as an invalid Item is
detected, the size of this iterator is adjusted.
getSize in interface javax.jcr.RangeIteratorItems in this iterator.RangeIterator.getSize()public void skip(long skipNum)
skip in interface javax.jcr.RangeIteratorRangeIterator.skip(long)public boolean hasNext()
hasNext in interface java.util.IteratorIterator.hasNext()public java.lang.Object next()
next in interface java.util.IteratorIterator.next()public void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - always since removal is not implemented.Iterator.remove()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||