public class DefaultResultSetCollector extends Object implements ResultSetCollector
Constructor and Description |
---|
DefaultResultSetCollector(boolean fillInUnreadValues) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount() |
String |
getColumnLabel(int column) |
String |
getColumnName(int column) |
List<List<Object>> |
getRows() |
void |
loadMetaDataIfNeeded(ResultSet rs)
Allow this
ResultSetCollector to obtain a ResultSetMetaData
from the real underlying JDBC ResultSet , and store it in an internal
attribute for later use. |
boolean |
methodReturned(ResultSetSpy resultSetSpy,
String methodCall,
Object returnValue,
Object targetObject,
Object... methodParams)
Expected to be called by a ResultSetSpy for all jdbc methods.
|
void |
preMethod(ResultSetSpy resultSetSpy,
String methodCall,
Object... methodParams)
Expected to be called by a ResultSetSpy for prior to the execution of all jdbc methods.
|
void |
reset()
Clear the result set so far.
|
public DefaultResultSetCollector(boolean fillInUnreadValues)
public List<List<Object>> getRows()
getRows
in interface ResultSetCollector
public int getColumnCount()
getColumnCount
in interface ResultSetCollector
public void reset()
ResultSetCollector
reset
in interface ResultSetCollector
public void loadMetaDataIfNeeded(ResultSet rs)
ResultSetCollector
ResultSetCollector
to obtain a ResultSetMetaData
from the real underlying JDBC ResultSet
, and store it in an internal
attribute for later use. The ResultSetMetaData
should be requested
to the real JDBC ResultSet
by this method only once,
if not already obtained and stored in an internal attribute, and should first check
if rs
is not already closed.
This methods is usually called under the hood by the ResultSetCollector
itself, but it might by required to manually load the ResultSetMetaData
if, for instance, the real ResultSet
is about to be closed before
the ResultSetCollector
requested for the ResultSetMetaData
(for instance, if the method next
was not previously called).loadMetaDataIfNeeded
in interface ResultSetCollector
rs
- The real JDBC ResultSet
that was wrapped into
a ResultSetSpy
.public String getColumnName(int column)
getColumnName
in interface ResultSetCollector
public String getColumnLabel(int column)
public boolean methodReturned(ResultSetSpy resultSetSpy, String methodCall, Object returnValue, Object targetObject, Object... methodParams)
ResultSetCollector
methodReturned
in interface ResultSetCollector
public void preMethod(ResultSetSpy resultSetSpy, String methodCall, Object... methodParams)
ResultSetCollector
preMethod
in interface ResultSetCollector
Copyright © 2013 Bgee - Swiss Institute of Bioinformatics. All Rights Reserved.