SPT Core API

com.sptci.echo2.table
Class ResultSetProxy

java.lang.Object
  extended by com.sptci.echo2.table.ResultSetProxy
All Implemented Interfaces:
InvocationHandler

public class ResultSetProxy
extends Object
implements InvocationHandler

A proxy ResultSet class to return the proxy ResultSetMetaDataProxy to protect against compatibility issues between JDBC standard and SQL standard on number fields declared without precision.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: ResultSetProxy.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2007-10-22

Method Summary
static ResultSet createResultSet(ResultSet resultSet)
          Returns a proxy result set which returns a proxy ResultSetMetaData object to handle imprecisely defined number columns
 Object invoke(Object proxy, Method method, Object[] parameters)
          The InvocationHandler implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createResultSet

public static ResultSet createResultSet(ResultSet resultSet)
Returns a proxy result set which returns a proxy ResultSetMetaData object to handle imprecisely defined number columns

Parameters:
resultSet - The result set that is to be proxied.
Returns:
The proxy instance.

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] parameters)
              throws SQLException
The InvocationHandler implementation. Passes through to resultSet except for invocation of the ResultSet.getMetaData() method which returns the proxy ResultSetMetaDataProxy class.

Specified by:
invoke in interface InvocationHandler
Parameters:
proxy - This proxy instance.
method - The method that is to be executed.
parameters - The parameters to pass to the method.
Throws:
SQLException - If errors are encountered while invoking the method.

SPT Core API