org.hibernate.engine.jdbc
Class ResultSetWrapperProxy

java.lang.Object
  extended by 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 Summary
static ResultSet generateProxy(ResultSet resultSet, ColumnNameCache columnNameCache)
          Generates a proxy wrapping the ResultSet.
static ClassLoader getProxyClassLoader()
          Determines the appropriate class loader to which the generated proxy should be scoped.
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.