private final class TableResultSet.MetaDataHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
ResultSetMetaData
proxy.
Only some of the methods are supported: (ResultSetMetaData.getColumnCount()
,
ResultSetMetaData.getColumnName(int)
, ResultSetMetaData.getColumnTypeName(int)
and
ResultSetMetaData.getColumnType(int)
. Note that, when working with dynamically generated
tables, internal generic indexed names are used for columns. To obtain the expected column
name, the column's legacy name is returned instead by getColumnName()
.Modifier and Type | Field and Description |
---|---|
private java.util.List<PropertyDefinition> |
props
The property list.
|
Constructor and Description |
---|
MetaDataHandler(java.util.List<PropertyDefinition> props)
Build a new instance which extracts metadata from the given property list.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Handler for
ResultSetMetaData APIs. |
private final java.util.List<PropertyDefinition> props
public MetaDataHandler(java.util.List<PropertyDefinition> props)
props
- The property list.public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
ResultSetMetaData
APIs. Only the following are supported:
ResultSetMetaData.getColumnCount()
- Returns the number of columns in this
ResultSet object.ResultSetMetaData.getColumnName(int)
- Get the designated column's name.ResultSetMetaData.getColumnTypeName(int)
- Retrieves the designated column's
database-specific type name.ResultSetMetaData.getColumnType(int)
- Retrieves the designated column's SQL
type.invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable