public class DistinctResultIterator<T> extends Object implements ResultIterator<T>
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | compareFullRows | 
| protected DbEntity | defaultEntity | 
| protected ResultIterator<T> | delegate | 
| protected Set<Object> | fetchedIds | 
| protected T | nextDataRow | 
| Constructor and Description | 
|---|
| DistinctResultIterator(ResultIterator<T> delegate,
                      DbEntity defaultEntity,
                      boolean compareFullRows)Creates new DistinctResultIterator wrapping another ResultIterator. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<T> | allRows()Returns all yet unread rows from ResultSet without closing it. | 
| void | close()Closes underlying ResultIterator. | 
| boolean | hasNextRow()Returns true if there is at least one more record that can be read from
 the iterator. | 
| Iterator<T> | iterator() | 
| T | nextRow()Returns the next result row that is, depending on the query, may be a
 scalar value, a DataRow, or an Object[] array containing a mix of scalars
 and DataRows. | 
| void | skipRow()Goes past current row. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected ResultIterator<T> delegate
protected T nextDataRow
protected DbEntity defaultEntity
protected boolean compareFullRows
public DistinctResultIterator(ResultIterator<T> delegate, DbEntity defaultEntity, boolean compareFullRows)
delegate - actual result iterator, that will be decorated by this DistinctResultIteratordefaultEntity - an entity needed to build ObjectIds for distinct comparison.public void close()
close in interface AutoCloseableclose in interface ResultIterator<T>public List<T> allRows()
ResultIteratorallRows in interface ResultIterator<T>public boolean hasNextRow()
ResultIteratorhasNextRow in interface ResultIterator<T>public T nextRow()
ResultIteratornextRow in interface ResultIterator<T>public void skipRow()
ResultIteratorskipRow in interface ResultIterator<T>Copyright © 2001–2023 Apache Cayenne. All rights reserved.