Class DefaultCursor<T>
- java.lang.Object
-
- org.apache.ibatis.cursor.defaults.DefaultCursor<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDefaultCursor.CursorIteratorprotected static classDefaultCursor.ObjectWrapperResultHandler<T>
-
Field Summary
Fields Modifier and Type Field Description protected DefaultCursor.ObjectWrapperResultHandler<T>objectWrapperResultHandler
-
Constructor Summary
Constructors Constructor Description DefaultCursor(DefaultResultSetHandler resultSetHandler, ResultMap resultMap, ResultSetWrapper rsw, RowBounds rowBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected TfetchNextObjectFromDatabase()protected TfetchNextUsingRowBound()intgetCurrentIndex()Get the current item index.booleanisConsumed()booleanisOpen()Iterator<T>iterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
objectWrapperResultHandler
protected final DefaultCursor.ObjectWrapperResultHandler<T> objectWrapperResultHandler
-
-
Constructor Detail
-
DefaultCursor
public DefaultCursor(DefaultResultSetHandler resultSetHandler, ResultMap resultMap, ResultSetWrapper rsw, RowBounds rowBounds)
-
-
Method Detail
-
isOpen
public boolean isOpen()
-
isConsumed
public boolean isConsumed()
- Specified by:
isConsumedin interfaceCursor<T>- Returns:
- true if the cursor is fully consumed and has returned all elements matching the query.
-
getCurrentIndex
public int getCurrentIndex()
Description copied from interface:CursorGet the current item index. The first item has the index 0.- Specified by:
getCurrentIndexin interfaceCursor<T>- Returns:
- -1 if the first cursor item has not been retrieved. The index of the current item retrieved.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
fetchNextUsingRowBound
protected T fetchNextUsingRowBound()
-
fetchNextObjectFromDatabase
protected T fetchNextObjectFromDatabase()
-
-