org.objectweb.jorm.lib
Class MultiplePNameIterator

java.lang.Object
  extended byorg.objectweb.jorm.lib.MultiplePNameIterator
All Implemented Interfaces:
java.util.Iterator, PNameIterator

public class MultiplePNameIterator
extends java.lang.Object
implements PNameIterator

is an implementation of the PNameIterator interface over several PClassMapping instances.

Author:
S.Chassande-Barrioz

Constructor Summary
MultiplePNameIterator(PClassMapping[] pcms, java.util.Iterator currentIt, java.lang.Object connection, boolean prefetching, java.lang.Object txctx)
          Builds a PNameIterator over an iterator and a set of PClassMapping instances.
MultiplePNameIterator(PClassMapping[] pcms, java.lang.Object connection, boolean prefetching, java.lang.Object txctx)
          Builds a PNameIterator over a set of PClassMapping instances
 
Method Summary
 void close()
          Close the PNameIterator is the prefetch is not activated.
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
          The remove operation is not supported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiplePNameIterator

public MultiplePNameIterator(PClassMapping[] pcms,
                             java.lang.Object connection,
                             boolean prefetching,
                             java.lang.Object txctx)
                      throws PException
Builds a PNameIterator over a set of PClassMapping instances

Parameters:
pcms - is the PClassMapping list
connection - is the connection to the data support
prefetching - indicates if prefetching is activated
Throws:
PException - if it is not possible to fetch the first element.

MultiplePNameIterator

public MultiplePNameIterator(PClassMapping[] pcms,
                             java.util.Iterator currentIt,
                             java.lang.Object connection,
                             boolean prefetching,
                             java.lang.Object txctx)
                      throws PException
Builds a PNameIterator over an iterator and a set of PClassMapping instances.

Parameters:
pcms - is the PClassMapping list
currentIt - is the first iterator to use which has not been obtained through a PClassMapping given in parameter.
connection - is the connection to the data support
prefetching - indicates if prefetching is activated
Throws:
PException - if it is not possible to fetch the first element.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there is a next PName

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
The remove operation is not supported

Specified by:
remove in interface java.util.Iterator

close

public void close()
           throws PException
Close the PNameIterator is the prefetch is not activated.

Specified by:
close in interface PNameIterator
Throws:
PException