public abstract class AbstractDataSourceIterator extends java.lang.Object implements DataSourceIterator
Constructor and Description |
---|
AbstractDataSourceIterator(AbstractDataSource abstractDataSource,
ForEachTag tag,
DataSourceNode[] stack,
IDataSourceResultSet resultSet)
Create the iterator.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
We are done with this iterator.
|
int |
getCount()
Return the count the iteration is on.
|
int |
getIndex()
Return the index the iteration is on.
|
DataSourceNode |
getNode(int index)
Returns the requested node from the set of nodes presently on.
|
AbstractDataSource |
getParent() |
java.lang.Object |
getResultSet()
Returns the result set this iterator presently holds.
|
ForEachTag |
getTag()
Return the forEach tag in use for this iterator.
|
boolean |
hasNext()
Returns true if the iteration has more nodes.
|
boolean |
isFirst()
Return true if on the first node returned.
|
boolean |
isLast()
Return true if on the last node returned.
|
abstract java.lang.Object |
next()
Returns the next node in the iteration.
|
void |
remove()
This will throw an UnsupportedOperationException.
|
public AbstractDataSourceIterator(AbstractDataSource abstractDataSource, ForEachTag tag, DataSourceNode[] stack, IDataSourceResultSet resultSet) throws DataSourceException
abstractDataSource
- The parent datasource.tag
- The forEach tag this is iterating over.stack
- The node stack. This is the root and all outer forEach tags this iis inside.resultSet
- The result set from the DataSourceNode that is creating this iterator.DataSourceException
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in interface DataSourceIterator
public abstract java.lang.Object next()
next
in interface java.util.Iterator
next
in interface DataSourceIterator
public DataSourceNode getNode(int index) throws java.util.NoSuchElementException
getNode
in interface DataSourceIterator
index
- The offset from the base node on. A value of 0 is identical to the value returned by next.java.util.NoSuchElementException
- thrown if past the end of the list.public void remove() throws java.util.NoSuchElementException
remove
in interface java.util.Iterator
remove
in interface DataSourceIterator
java.util.NoSuchElementException
public AbstractDataSource getParent()
public boolean isFirst()
isFirst
in interface DataSourceIterator
public boolean isLast()
isLast
in interface DataSourceIterator
public void close()
close
in interface DataSourceIterator
public java.lang.Object getResultSet() throws DataSourceException
getResultSet
in interface DataSourceIterator
DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public int getIndex()
getIndex
in interface DataSourceIterator
public int getCount()
getCount
in interface DataSourceIterator
public ForEachTag getTag()
getTag
in interface DataSourceIterator
Copyright © 2002-2021 Windward Studios, LLC. - All Rights Reserved. We are Java document generation software