Top Fields Constructors Methods
org.jooq.impl

pack-priv abstract Class AbstractCursor<R extends org.jooq.Record>

extends AbstractResult<R extends Record>
implements Cursor<R extends Record>
Class Inheritance
All Implemented Interfaces
org.jooq.Cursor, java.lang.AutoCloseable, org.jooq.Formattable, java.lang.Iterable, org.jooq.Fields
Known Direct Subclasses
org.jooq.impl.CursorImpl, org.jooq.impl.ResultAsCursor
Imports
java.util.List, .Optional, .Spliterator, .Spliterators, java.util.stream.Collector, .Stream, .StreamSupport, org.jooq.Configuration, .Cursor, .Record, .RecordHandler, .RecordMapper, .Result, .Table

Author
Lukas Eder

Field Summary

Inherited from org.jooq.impl.AbstractResult:
fields

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractCursor(Configuration configuration, AbstractRow<R> row)

Method Summary

Modifier and TypeMethod and Description
public final <X, A> X
collect(Collector<? super R, A, X>
The collector that collects all records and accumulates them into a result type.
collector
)

Implements org.jooq.Cursor.collect.

Reduce the execution results of this query using a Collector.
public final Result<R>
fetch()

Implements org.jooq.Cursor.fetch.

Fetch all remaining records as a result.
public final Result<R>
fetch(int number)

Implements org.jooq.Cursor.fetch.

public final <E> List<E>
fetch(RecordMapper<? super R, E>
The mapper callback
mapper
)

Implements org.jooq.Cursor.fetch.

Fetch results into a custom mapper callback.
public final <H extends RecordHandler<? super R>> H
fetchInto(H
The handler callback
handler
)

Implements org.jooq.Cursor.fetchInto.

Fetch results into a custom handler callback.
public final <E> List<E>
fetchInto(Class<? extends E>
The entity type.
clazz
)

Implements org.jooq.Cursor.fetchInto, org.jooq.Cursor.fetchInto.

Map resulting records onto a custom type.
public final <Z extends Record> Result<Z>
fetchInto(Table<Z>
The table type.
table
)

Implements org.jooq.Cursor.fetchInto, org.jooq.Cursor.fetchInto.

Map resulting records onto a custom record.
public final R
fetchNext()

Implements org.jooq.Cursor.fetchNext.

Fetch the next record from the cursor.
public final <E> E
fetchNext(RecordMapper<? super R, E>
The mapper callback
mapper
)

Implements org.jooq.Cursor.fetchNext.

Fetch the next record into a custom mapper callback.
public final <H extends RecordHandler<? super R>> H
fetchNextInto(H
The handler callback
handler
)

Implements org.jooq.Cursor.fetchNextInto.

Fetch the next record into a custom handler callback.
public final <E> E
fetchNextInto(Class<? extends E>
The entity type.
clazz
)

Implements org.jooq.Cursor.fetchNextInto, org.jooq.Cursor.fetchNextInto.

Map the next resulting record onto a custom type.
public final <Z extends Record> Z
fetchNextInto(Table<Z>
The table type.
table
)

Implements org.jooq.Cursor.fetchNextInto, org.jooq.Cursor.fetchNextInto.

Map the next resulting record onto a custom record.
public final Optional<R>
fetchNextOptional()

Implements org.jooq.Cursor.fetchNextOptional.

Fetch the next record from the cursor.
public final <E> Optional<E>
fetchNextOptional(RecordMapper<? super R, E>
The mapper callback
mapper
)

Implements org.jooq.Cursor.fetchNextOptional.

Fetch the next record into a custom mapper callback.
public final <E> Optional<E>
fetchNextOptionalInto(Class<? extends E>
The entity type.
type
)

Implements org.jooq.Cursor.fetchNextOptionalInto.

Map the next resulting record onto a custom type.
public final <Z extends Record> Optional<Z>
fetchNextOptionalInto(Table<Z>
The table type.
table
)

Implements org.jooq.Cursor.fetchNextOptionalInto.

Map the next resulting record onto a custom record.
public final R
fetchOne()

Implements org.jooq.Cursor.fetchOne.

Deprecated
public final <E> E
fetchOne(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetchOne.

Deprecated
public final <H extends RecordHandler<? super R>> H
fetchOneInto(H handler)

Implements org.jooq.Cursor.fetchOneInto.

Deprecated
public final <Z extends Record> Z
public final <E> E
public final Optional<R>
public final <E> Optional<E>
fetchOptional(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetchOptional.

Deprecated
public final <E> Optional<E>
fetchOptionalInto(Class<? extends E> type)

Implements org.jooq.Cursor.fetchOptionalInto.

Deprecated
public final <Z extends Record> Optional<Z>
public final boolean
hasNext()

Implements org.jooq.Cursor.hasNext.

Check whether this cursor has a next record.
public final Stream<R>
stream()

Implements org.jooq.Cursor.stream.

Turn this Cursor into a Stream.
Inherited from org.jooq.impl.AbstractResult:
createContentdefaultJSONFormatdefaultXMLFormatfieldsRowformatformat0formatChartformatCSVformatHTMLformatInsertformatInsertformatJSONformatJSON0formatJSONArray0formatJSONMap0formatXMLformatXMLRecordintoXMLintoXMLrecordType

Constructor Detail

AbstractCursorback to summary
pack-priv AbstractCursor(Configuration configuration, AbstractRow<R> row)

Method Detail

collectback to summary
public final <X, A> X collect(Collector<? super R, A, X> collector)

Implements org.jooq.Cursor.collect.

Doc from org.jooq.Cursor.collect.

Reduce the execution results of this query using a Collector.

This works in the same way as calling the following code:


cursor.stream().collect(collector);

Parameters
collector:Collector<? super R, A, X>

The collector that collects all records and accumulates them into a result type.

Returns:X

The result of the collection.

Annotations
@Override
fetchback to summary
public final Result<R> fetch()

Implements org.jooq.Cursor.fetch.

Doc from org.jooq.Cursor.fetch.

Fetch all remaining records as a result.

This will conveniently close the Cursor, after the last Record was fetched.

The result and its contained records are attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Annotations
@Override
fetchback to summary
public final Result<R> fetch(int number)

Implements org.jooq.Cursor.fetch.

Annotations
@Override
fetchback to summary
public final <E> List<E> fetch(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetch.

Doc from org.jooq.Cursor.fetch.

Fetch results into a custom mapper callback.

Parameters
mapper:RecordMapper<? super R, E>

The mapper callback

Returns:List<E>

The custom mapped records

Annotations
@Override
fetchIntoback to summary
public final <H extends RecordHandler<? super R>> H fetchInto(H handler)

Implements org.jooq.Cursor.fetchInto.

Doc from org.jooq.Cursor.fetchInto.

Fetch results into a custom handler callback.

The resulting records are attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Parameters
handler:H

The handler callback

Returns:H

Convenience result, returning the parameter handler itself

Annotations
@Override
fetchIntoback to summary
public final <E> List<E> fetchInto(Class<? extends E> clazz)

Implements org.jooq.Cursor.fetchInto, org.jooq.Cursor.fetchInto.

Doc from org.jooq.Cursor.fetchInto.

Map resulting records onto a custom type.

This is the same as calling fetch().into(type). See Record#into(Class) for more details

Parameters
<E>
The generic entity type.
clazz:Class<? extends E>

The entity type.

Annotations
@Override
fetchIntoback to summary
public final <Z extends Record> Result<Z> fetchInto(Table<Z> table)

Implements org.jooq.Cursor.fetchInto, org.jooq.Cursor.fetchInto.

Doc from org.jooq.Cursor.fetchInto.

Map resulting records onto a custom record.

This is the same as calling fetch().into(table). See Record#into(Class) for more details

The result and its contained records are attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Parameters
<Z>
The generic table record type.
table:Table<Z>

The table type.

Annotations
@Override
fetchNextback to summary
public final R fetchNext()

Implements org.jooq.Cursor.fetchNext.

Doc from org.jooq.Cursor.fetchNext.

Fetch the next record from the cursor.

This will conveniently close the Cursor, after the last Record was fetched.

The resulting record is attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Returns:R

The next record from the cursor, or null if there is no next record.

Annotations
@Override
fetchNextback to summary
public final <E> E fetchNext(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetchNext.

Doc from org.jooq.Cursor.fetchNext.

Fetch the next record into a custom mapper callback.

This will conveniently close the Cursor, after the last Record was fetched.

Parameters
mapper:RecordMapper<? super R, E>

The mapper callback

Returns:E

The custom mapped record

Annotations
@Override
fetchNextIntoback to summary
public final <H extends RecordHandler<? super R>> H fetchNextInto(H handler)

Implements org.jooq.Cursor.fetchNextInto.

Doc from org.jooq.Cursor.fetchNextInto.

Fetch the next record into a custom handler callback.

This will conveniently close the Cursor, after the last Record was fetched.

The resulting record is attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Parameters
handler:H

The handler callback

Returns:H

Convenience result, returning the parameter handler itself

Annotations
@Override
fetchNextIntoback to summary
public final <E> E fetchNextInto(Class<? extends E> clazz)

Implements org.jooq.Cursor.fetchNextInto, org.jooq.Cursor.fetchNextInto.

Doc from org.jooq.Cursor.fetchNextInto.

Map the next resulting record onto a custom type.

This is the same as calling fetchOne().into(type). See Record#into(Class) for more details

Parameters
<E>
The generic entity type.
clazz:Class<? extends E>

The entity type.

Annotations
@Override
fetchNextIntoback to summary
public final <Z extends Record> Z fetchNextInto(Table<Z> table)

Implements org.jooq.Cursor.fetchNextInto, org.jooq.Cursor.fetchNextInto.

Doc from org.jooq.Cursor.fetchNextInto.

Map the next resulting record onto a custom record.

This is the same as calling fetchOne().into(table). See Record#into(Class) for more details

The resulting record is attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Parameters
<Z>
The generic table record type.
table:Table<Z>

The table type.

Annotations
@Override
fetchNextOptionalback to summary
public final Optional<R> fetchNextOptional()

Implements org.jooq.Cursor.fetchNextOptional.

Doc from org.jooq.Cursor.fetchNextOptional.

Fetch the next record from the cursor.

This will conveniently close the Cursor, after the last Record was fetched.

The resulting record is attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Returns:Optional<R>

The next record from the cursor

Annotations
@Override
fetchNextOptionalback to summary
public final <E> Optional<E> fetchNextOptional(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetchNextOptional.

Doc from org.jooq.Cursor.fetchNextOptional.

Fetch the next record into a custom mapper callback.

This will conveniently close the Cursor, after the last Record was fetched.

Parameters
mapper:RecordMapper<? super R, E>

The mapper callback

Returns:Optional<E>

The custom mapped record

Annotations
@Override
fetchNextOptionalIntoback to summary
public final <E> Optional<E> fetchNextOptionalInto(Class<? extends E> type)

Implements org.jooq.Cursor.fetchNextOptionalInto.

Doc from org.jooq.Cursor.fetchNextOptionalInto.

Map the next resulting record onto a custom type.

This is the same as calling fetchOne().into(type). See Record#into(Class) for more details

Parameters
<E>
The generic entity type.
type:Class<? extends E>

The entity type.

Annotations
@Override
fetchNextOptionalIntoback to summary
public final <Z extends Record> Optional<Z> fetchNextOptionalInto(Table<Z> table)

Implements org.jooq.Cursor.fetchNextOptionalInto.

Doc from org.jooq.Cursor.fetchNextOptionalInto.

Map the next resulting record onto a custom record.

This is the same as calling fetchOne().into(table). See Record#into(Class) for more details

The resulting record is attached to the original Configuration by default. Use Settings#isAttachRecords() to override this behaviour.

Parameters
<Z>
The generic table record type.
table:Table<Z>

The table type.

Annotations
@Override
fetchOneback to summary
public final R fetchOne()

Implements org.jooq.Cursor.fetchOne.

Deprecated

Annotations
@Override
@Deprecated
fetchOneback to summary
public final <E> E fetchOne(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetchOne.

Deprecated

Annotations
@Override
@Deprecated
fetchOneIntoback to summary
public final <H extends RecordHandler<? super R>> H fetchOneInto(H handler)

Implements org.jooq.Cursor.fetchOneInto.

Deprecated

Annotations
@Override
@Deprecated
fetchOneIntoback to summary
public final <Z extends Record> Z fetchOneInto(Table<Z> table)

Implements org.jooq.Cursor.fetchOneInto, org.jooq.Cursor.fetchOneInto.

Deprecated

Annotations
@Override
@Deprecated
fetchOneIntoback to summary
public final <E> E fetchOneInto(Class<? extends E> type)

Implements org.jooq.Cursor.fetchOneInto, org.jooq.Cursor.fetchOneInto.

Deprecated

Annotations
@Override
@Deprecated
fetchOptionalback to summary
public final Optional<R> fetchOptional()

Implements org.jooq.Cursor.fetchOptional.

Deprecated

Annotations
@Override
@Deprecated
fetchOptionalback to summary
public final <E> Optional<E> fetchOptional(RecordMapper<? super R, E> mapper)

Implements org.jooq.Cursor.fetchOptional.

Deprecated

Annotations
@Override
@Deprecated
fetchOptionalIntoback to summary
public final <E> Optional<E> fetchOptionalInto(Class<? extends E> type)

Implements org.jooq.Cursor.fetchOptionalInto.

Deprecated

Annotations
@Override
@Deprecated
fetchOptionalIntoback to summary
public final <Z extends Record> Optional<Z> fetchOptionalInto(Table<Z> table)

Implements org.jooq.Cursor.fetchOptionalInto.

Deprecated

Annotations
@Override
@Deprecated
hasNextback to summary
public final boolean hasNext()

Implements org.jooq.Cursor.hasNext.

Doc from org.jooq.Cursor.hasNext.

Check whether this cursor has a next record.

This will conveniently close the Cursor, after the last Record was fetched.

Annotations
@Override
streamback to summary
public final Stream<R> stream()

Implements org.jooq.Cursor.stream.

Doc from org.jooq.Cursor.stream.

Turn this Cursor into a Stream.

Annotations
@Override