Package org.hibernate.engine.jdbc
Class ResultSetWrapperProxy
java.lang.Object
org.hibernate.engine.jdbc.ResultSetWrapperProxy
- All Implemented Interfaces:
InvocationHandler
A proxy for a ResultSet delegate, responsible for locally caching the columnName-to-columnIndex resolution that
has been found to be inefficient in a few vendor's drivers (i.e., Oracle and Postgres).
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultSetgenerateProxy(ResultSet resultSet, ColumnNameCache columnNameCache) Generates a proxy wrapping the ResultSet.static ClassLoaderDetermines the appropriate class loader to which the generated proxy should be scoped.
-
Method Details
-
generateProxy
Generates a proxy wrapping the ResultSet.- Parameters:
resultSet- The resultSet to wrap.columnNameCache- The cache storing data for converting column names to column indexes.- Returns:
- The generated proxy.
-
getProxyClassLoader
Determines the appropriate class loader to which the generated proxy should be scoped.- Returns:
- The class loader appropriate for proxy construction.
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-