private final class TableResultSet.DataHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
ResultSet
proxy. This will provide the data in a
forward-only
manner.Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
data
The data for the current row.
|
private java.util.Iterator<java.lang.Object[]> |
iter
An iterator over the data.
|
private java.util.List<PropertyDefinition> |
props
The list of properties.
|
private java.sql.ResultSetMetaData |
rsmd
The
ResultSetMetaData proxy. |
private boolean |
wasNull
Flag indicating if the last retrieved column was SQL-null.
|
Constructor and Description |
---|
DataHandler()
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
private int |
getPropertyIndex(java.lang.String name)
Get the 1-based index for the property with the specified name.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Handler for the
ResultSet APIs. |
private java.sql.ResultSetMetaData rsmd
ResultSetMetaData
proxy.private java.util.List<PropertyDefinition> props
private java.util.Iterator<java.lang.Object[]> iter
private boolean wasNull
private java.lang.Object[] data
public DataHandler()
property list
and the metadata
.public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
ResultSet
APIs. Only the following are supported:
ResultSet.next()
ResultSet.close()
ResultSet.isClosed()
ResultSet.wasNull()
ResultSet.findColumn(java.lang.String)
ResultSet.relative(int)
ResultSet.getType()
ResultSet.getMetaData()
ResultSet.getObject(int)
ResultSet.getBoolean(int)
ResultSet.getDouble(int)
ResultSet.getBigDecimal(int, int)
ResultSet.getFloat(int)
ResultSet.getInt(int)
ResultSet.getLong(int)
ResultSet.getShort(int)
ResultSet.getByte(int)
ResultSet.getString(int)
ResultSet.getDate(int)
ResultSet.getTime(int)
ResultSet.getTimestamp(int)
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
private int getPropertyIndex(java.lang.String name) throws java.sql.SQLException
SQLException
is throw.name
- The property name.java.sql.SQLException
- If the property was not found.