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.CayenneException
public void close() throws CayenneException
close
in interface ResultIterator
CayenneException
public List<?> allRows() throws CayenneException
ResultIterator
allRows
in interface ResultIterator
CayenneException
public boolean hasNextRow() throws CayenneException
ResultIterator
hasNextRow
in interface ResultIterator
CayenneException
public Object nextRow() throws CayenneException
ResultIterator
nextRow
in interface ResultIterator
CayenneException
public void skipRow() throws CayenneException
skipRow
in interface ResultIterator
CayenneException
Copyright © 2001–2018 Apache Cayenne. All rights reserved.