private Object getReturnResultSet ( Object implObject , Method method ) throws IllegalAccessException , IllegalArgumentException , InvocationTargetException , SQLException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getReturnResultSet" , this ) ; WSJdbcResultSet rsetWrapper = null ; ResultSet rsetImpl = ( ResultSet ) method . invoke ( implObject ) ; if ( rsetImpl != null ) { // If the childWrapper is null, and the childWrappers is null or // empty, set the result set to childWrapper; // Otherwise, add the result set to childWrappers if ( childWrapper == null && ( childWrappers == null || childWrappers . isEmpty ( ) ) ) { childWrapper = rsetWrapper = mcf . jdbcRuntime . newResultSet ( rsetImpl , this ) ; if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Set the result set to child wrapper" ) ; } else { if ( childWrappers == null ) childWrappers = new ArrayList < Wrapper > ( 5 ) ; rsetWrapper = mcf . jdbcRuntime . newResultSet ( rsetImpl , this ) ; childWrappers . add ( rsetWrapper ) ; if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Add the result set to child wrappers list." ) ; } } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getReturnResultSet" , rsetWrapper ) ; return rsetWrapper ; }
Invokes getReturnResultSet and wraps the result set .