public final class ResultSetList extends LinkedList<Map<String,Object>>
ResultSet into a list of maps.
Loads the entire result set into an in-memory data structure, and then closes the result set object.
modCount| Constructor and Description |
|---|
ResultSetList(ResultSet rs,
int pos,
int limit,
boolean includeRowNums)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static Object |
readEntry(ResultSet rs,
int col,
int dataType)
Reads the specified column from the current row in the result set.
|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArrayiteratorequals, hashCode, listIterator, removeRange, subListcontainsAll, isEmpty, removeAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subListparallelStream, removeIf, streampublic ResultSetList(ResultSet rs, int pos, int limit, boolean includeRowNums) throws SQLException
rs - The result set to load into this DTO.pos - The start position (zero-indexed).limit - The maximum number of rows to retrieve.includeRowNums - Make the first column be the row number.SQLException - Database error.protected static Object readEntry(ResultSet rs, int col, int dataType)
Subclasses can override this method to handle specific data types in special ways.
rs - The result set to read from.col - The column number (indexed by 1).dataType - The type of the entry.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.