Class ResultSetWrapperProxy

java.lang.Object
org.hibernate.engine.jdbc.ResultSetWrapperProxy
All Implemented Interfaces:
InvocationHandler

public class ResultSetWrapperProxy extends Object implements 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 Details

    • generateProxy

      public static ResultSet generateProxy(ResultSet resultSet, ColumnNameCache columnNameCache)
      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

      public static ClassLoader getProxyClassLoader()
      Determines the appropriate class loader to which the generated proxy should be scoped.
      Returns:
      The class loader appropriate for proxy construction.
    • invoke

      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable