This interface is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanabsolute(int row) Move cursor to the absolute row.voidMove cursor after last record.default voidSignals to the fetcher that an insert is about to be executed.voidMove cursor before first record.voidclose()Close this fetcher and corresponding result set.voidclose(CompletionReason completionReason) Close this fetcher and corresponding result set.intThe current position of the fetcher.voidDelete row at current position.booleanfirst()Move cursor to the first row.intRetrieves the fetch direction for this fetcher object.intGet the suggested number of rows to fetch with each batch fetch.intGet row number.voidInsert row at current position.booleanbooleanbooleanisClosed()booleanisEmpty()booleanisFirst()booleanisLast()booleanlast()Move cursor to the last row.booleannext()Move to next row.booleanprevious()Move cursor to the previous row.booleanrelative(int row) Move cursor relative to the current row.voidNotifies the fetcher listener with the row data of the current row (or {nullif not currently in a row).default booleanIs the current row a deleted row (through the owning result set)?default booleanIs the current row a newly inserted row (through the owning result set)?default booleanIs the current row an updated row (through the owning result set)?voidsetFetchDirection(int direction) Gives a hint as to the direction in which the rows in this fetcher object will be processed.voidsetFetcherListener(FBObjectListener.FetcherListener fetcherListener) Sets the fetcher listener.voidsetFetchSize(int fetchSize) Set the suggested number of rows to fetch with each batch fetch.voidUpdates the result set behavior of this fetcher to readonly.intsize()Total number of rows of this fetcher, taking the max rows into account if relevant.voidUpdate row at current position.
-
Field Details
-
DEFAULT_FETCH_ROWS
static final int DEFAULT_FETCH_ROWS- See Also:
-
-
Method Details
-
first
Move cursor to the first row.- Returns:
trueif cursor was moved to the first row.- Throws:
SQLException
-
last
Move cursor to the last row.- Returns:
trueif cursor was moved to the last row.- Throws:
SQLException
-
previous
Move cursor to the previous row.- Returns:
trueif cursor was moved to the previous row.- Throws:
SQLException
-
next
Move to next row.- Returns:
trueif cursor was moved.- Throws:
SQLException
-
absolute
Move cursor to the absolute row.- Parameters:
row- absolute row number.- Returns:
trueif cursor was successfully moved.- Throws:
SQLException
-
relative
Move cursor relative to the current row.- Parameters:
row- relative row position.- Returns:
trueif cursor was successfully moved.- Throws:
SQLException
-
beforeFirst
Move cursor before first record.- Throws:
SQLException
-
afterLast
Move cursor after last record.- Throws:
SQLException
-
close
Close this fetcher and corresponding result set.Equivalent to calling
close(CompletionReason)withCompletionReason.OTHER.- Throws:
SQLException
-
close
Close this fetcher and corresponding result set.- Parameters:
completionReason- Reason for completion- Throws:
SQLException
-
isClosed
boolean isClosed()- Returns:
trueif this fetcher is closed, otherwisefalse- Since:
- 6
-
getRowNum
Get row number.- Returns:
- row number
- Throws:
SQLException- See Also:
-
isEmpty
- Returns:
trueif the result set is empty; otherwisefalse- Throws:
SQLException
-
isBeforeFirst
- Returns:
trueif positioned before the first row, contrary toResultSet.isBeforeFirst()it also reportstrueif empty and next was not invoked- Throws:
SQLException- See Also:
-
isFirst
- Throws:
SQLException- See Also:
-
isLast
- Throws:
SQLException- See Also:
-
isAfterLast
- Returns:
trueif positioned after the last row, contrary toResultSet.isBeforeFirst()it also reportstrueif empty and next was invoked- Throws:
SQLException- See Also:
-
beforeExecuteInsert
Signals to the fetcher that an insert is about to be executed.This method is primarily intended for a workaround with
FBServerScrollFetcherif the insert is performed when the server-side cursor is not fully materialized by the server, as that could result in the server also including the inserted row, leading to duplicate reporting of the inserted row. In response to this method, the fetcher can trigger full materialization of the server-side cursor.The default implementation of this method does nothing.
- Throws:
SQLException- for database access exceptions- Since:
- 5.0.6
-
insertRow
Insert row at current position. This method adds a row at the current position in case of updatable result sets after successful execution of theResultSet.insertRow()method.- Parameters:
data- row data- Throws:
SQLException
-
deleteRow
Delete row at current position. This method deletes a row at the current position in case of updatable result sets after successful execution of theResultSet.deleteRow()method.- Throws:
SQLException
-
updateRow
Update row at current position. This method updates a row at the current position in case of updatable result sets after successful execution of theResultSet.updateRow()method.- Parameters:
data- row data- Throws:
SQLException
-
renotifyCurrentRow
Notifies the fetcher listener with the row data of the current row (or {nullif not currently in a row).- Throws:
SQLException
-
getFetchConfig
FetchConfig getFetchConfig()- Returns:
- current fetch config of this fetcher
- Since:
- 6
-
setReadOnly
Updates the result set behavior of this fetcher to readonly.- Throws:
SQLException- if called on a closed fetcher, or if this fetcher is explicitly used for updatable use cases- Since:
- 6
-
getFetchSize
Get the suggested number of rows to fetch with each batch fetch.- Returns:
- The number of rows to be fetched, or
0for the default fetch size - Throws:
SQLException
-
setFetchSize
Set the suggested number of rows to fetch with each batch fetch.- Parameters:
fetchSize- The suggested number of rows to fetch, or0to use the default fetch size- Throws:
SQLException- iffetchSize < 0
-
getFetchDirection
Retrieves the fetch direction for this fetcher object.- Returns:
- current fetch direction
- Throws:
SQLException- Since:
- 6
-
setFetchDirection
Gives a hint as to the direction in which the rows in this fetcher object will be processed.NOTE: In practice, existing fetcher implementations only validate and store the value, and the value is effectively ignored.
- Parameters:
direction- fetch direction; one ofResultSet.FETCH_FORWARD,ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN- Throws:
SQLException- Since:
- 6
-
currentPosition
The current position of the fetcher.Contrary to
getRowNum(), this should also report the after-last position.- Returns:
- Position of the fetcher, with
0for before-first, andsize + 1for after-last. - Throws:
SQLException- See Also:
-
size
Total number of rows of this fetcher, taking the max rows into account if relevant.If the size of the fetcher is not known or not fixed, a
SQLExceptionshould be thrown.- Returns:
- size of fetcher
- Throws:
SQLException- For exception retrieving the cursor size, or if it is not possible to determine the fetcher size
-
setFetcherListener
Sets the fetcher listener.Any current fetcher is replaced with the provided fetcher listener.
- Parameters:
fetcherListener- Fetcher listener
-
rowInserted
Is the current row a newly inserted row (through the owning result set)?- Returns:
trueif the row is newly inserted,falseotherwise- Throws:
SQLException
-
rowDeleted
Is the current row a deleted row (through the owning result set)?- Returns:
trueif the row is deleted,falseotherwise- Throws:
SQLException
-
rowUpdated
Is the current row an updated row (through the owning result set)?- Returns:
trueif the row is updated,falseotherwise- Throws:
SQLException
-