Modifier and Type | Field and Description |
---|---|
protected RowMapper<T> |
rm |
protected int |
rowNum
处理的记录位置(第几条记录):可以只针对某一条记录做特殊处理,从0开始
|
protected ResultSet |
rs |
protected ResultSetMetaData |
rsmd |
Constructor and Description |
---|
ResultSetIteration() |
ResultSetIteration(ResultSet rs,
RowMapper<T> rm) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected T |
fetchNext() |
RowMapper<T> |
getRm() |
ResultSet |
getRs() |
boolean |
hasNext()
Iterator接口
|
static <T> ResultSetIteration<T> |
iteration(ResultSet rs,
RowMapper<T> mapper)
Generates an
Iterable , suitable for use in for-each loops. |
Iterator<T> |
iterator()
Iterable接口
|
T |
next()
Iterator接口
|
void |
remove() |
void |
reset()
重置
|
protected void |
rethrow(SQLException e) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
forEach, spliterator
protected ResultSet rs
protected ResultSetMetaData rsmd
protected int rowNum
public void reset()
protected T fetchNext()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
protected void rethrow(SQLException e)
public ResultSet getRs()
public static <T> ResultSetIteration<T> iteration(ResultSet rs, RowMapper<T> mapper)
Iterable
, suitable for use in for-each loops.rs
- Wrap this ResultSet
in an Iterator
.Iterable
, suitable for use in for-each loops.Copyright © 2020. All rights reserved.