org.enhydra.shark.api.client.wfmc.wapi
Class WMIterator

java.lang.Object
  extended by org.enhydra.shark.api.client.wfmc.wapi.WMIterator
All Implemented Interfaces:
java.io.Serializable, java.util.Iterator
Direct Known Subclasses:
WMAAuditEntryIterator, WMActivityInstanceIterator, WMActivityInstanceStateIterator, WMAttributeIterator, WMEntityIterator, WMProcessDefinitionIterator, WMProcessDefinitionStateIterator, WMProcessInstanceIterator, WMProcessInstanceStateIterator, WMWorkItemIterator, WMWorkItemStateIterator

public abstract class WMIterator
extends java.lang.Object
implements java.util.Iterator, java.io.Serializable

Special iterator that can return an element count. The sub-interfaces all provide typesafe tsNext() methods to access the elements of the iteration.

Author:
Adrian Price
See Also:
Serialized Form

Field Summary
protected  int cursor
           
 
Constructor Summary
WMIterator()
           
 
Method Summary
 int getCount()
          Returns the number of items that matched the query criteria.
 boolean hasNext()
           
 void remove()
           
 void setCount(int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
next
 

Field Detail

cursor

protected int cursor
Constructor Detail

WMIterator

public WMIterator()
Method Detail

getCount

public int getCount()
Returns the number of items that matched the query criteria. N.B. This iterator class is used to return either the objects themselves or a count of the total number of objects. In the former case the count value may be unknown, in which case the method returns -1.

Returns:
Iteration count.

setCount

public void setCount(int count)

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator