public class ResultsetSpliterator<T> extends Spliterators.AbstractSpliterator<T> implements Runnable
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
Constructor and Description |
---|
ResultsetSpliterator(RecordMapper<T> recordMapper,
Criteria criteria,
Statement statement,
ResultSet resultSet)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Method to be run onClose() of associated stream
|
boolean |
tryAdvance(Consumer<? super T> action) |
characteristics, estimateSize, trySplit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
public ResultsetSpliterator(RecordMapper<T> recordMapper, Criteria criteria, Statement statement, ResultSet resultSet) throws TorqueException
recordMapper
- a RecordMapper to map ResultSet rows to entities of type Tcriteria
- a Criteriastatement
- the statement that created the ResultSetresultSet
- the JDBC result setTorqueException
- backend database exceptionpublic boolean tryAdvance(Consumer<? super T> action)
tryAdvance
in interface Spliterator<T>
public void run()
run
in interface Runnable
Runnable.run()
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.