public class DistinctResultIterator extends Object implements ResultIterator
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
compareFullRows |
protected DbEntity |
defaultEntity |
protected Set<Map<String,Object>> |
fetchedIds |
protected Object |
nextDataRow |
protected ResultIterator |
wrappedIterator |
| Constructor and Description |
|---|
DistinctResultIterator(ResultIterator wrappedIterator,
DbEntity defaultEntity,
boolean compareFullRows)
Creates new DistinctResultIterator wrapping another ResultIterator.
|
| Modifier and Type | Method and Description |
|---|---|
List<?> |
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.
|
Object |
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() |
protected ResultIterator wrappedIterator
protected Object nextDataRow
protected DbEntity defaultEntity
protected boolean compareFullRows
public DistinctResultIterator(ResultIterator wrappedIterator, DbEntity defaultEntity, boolean compareFullRows) throws CayenneException
wrappedIterator - defaultEntity - an entity needed to build ObjectIds for distinct comparison.CayenneExceptionpublic void close()
throws CayenneException
close in interface ResultIteratorCayenneExceptionpublic List<?> allRows() throws CayenneException
ResultIteratorallRows in interface ResultIteratorCayenneExceptionpublic boolean hasNextRow()
throws CayenneException
ResultIteratorhasNextRow in interface ResultIteratorCayenneExceptionpublic Object nextRow() throws CayenneException
ResultIteratornextRow in interface ResultIteratorCayenneExceptionpublic void skipRow()
throws CayenneException
skipRow in interface ResultIteratorCayenneExceptionCopyright © 2001–2018 Apache Cayenne. All rights reserved.