Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364982 - DBWS: need to handle processing simple, PL/SQL and Advanced JDBC args in a single code path
Summary: DBWS: need to handle processing simple, PL/SQL and Advanced JDBC args in a si...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-28 12:40 EST by David McCann CLA
Modified: 2022-06-09 10:31 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix to combine tow buildProcedureOperation methods into a single one. (51.55 KB, patch)
2011-11-28 12:44 EST, David McCann CLA
no flags Details | Diff
Proposed fix to combine two buildProcedureOperation methods into a single one. (55.44 KB, patch)
2011-11-28 15:06 EST, David McCann CLA
no flags Details | Diff
Proposed fix to combine two buildQueryForProcedureType methods into a single one. (27.28 KB, patch)
2011-11-29 11:37 EST, David McCann CLA
no flags Details | Diff
Proposed fix to combine two buildQueryForProcedureType methods into a single one version 2. (27.31 KB, patch)
2011-11-29 11:56 EST, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David McCann CLA 2011-11-28 12:40:48 EST
When generating query operations and calls, we currently split processing down separate code paths depending on whether we have simple or complex args, and in many places we again choose separate code paths depending on whether a given arg type is PL/SQL or Advanced JDBC.  Since we are now going to add support for mixing PL/SQL and Advanced JDBC args (with scalars) we need to consolidate the processing code such that it handles the various combinations of arg types in a single code path.
Comment 1 David McCann CLA 2011-11-28 12:44:58 EST
Created attachment 207612 [details]
Proposed fix to combine tow buildProcedureOperation methods into a single one.

This patch contains the first part of the fix for this issue.  Two buildProcedureOperation methods have been merged into a single one.  It uses a flag to indicate that the procedure(s) being processed are complex vs. simple - executing the various blocks of code accordingly.

A number of strings have also been replaced with statics in OracleHelper and Util.
Comment 2 David McCann CLA 2011-11-28 15:06:02 EST
Created attachment 207623 [details]
Proposed fix to combine two buildProcedureOperation methods into a single one.

Version #2.  Removed code that unnecessarily iterated over args and created two lists - one for procs with complex args, one for procs with simple args.
Comment 3 Mike Norman CLA 2011-11-28 15:09:43 EST
whew, that's a big diff! But it looks good
Comment 4 David McCann CLA 2011-11-28 16:26:08 EST
Fix part# 1 checked in to revision 10473
Reviewed by:  michael.norman@oracle.com
Tests:  all unit tests pass as expected
Comment 5 David McCann CLA 2011-11-29 11:37:22 EST
Created attachment 207663 [details]
Proposed fix to combine two buildQueryForProcedureType methods into a single one.

This fix combines buildQueryForPLSQLProcedureType and buildQueryForAdvancedJDBCProcedureType into a single method.  The code makes use of a flag that indicates whether the stored procedure has one or more PL/SQL arguments in order to execute the correct code blocks.
Comment 6 David McCann CLA 2011-11-29 11:56:27 EST
Created attachment 207666 [details]
Proposed fix to combine two buildQueryForProcedureType methods into a single one version 2.

Renamed the boolean from 'flag' to 'hasComplexArgs'
Comment 7 David McCann CLA 2011-11-29 12:32:25 EST
Fix part #2 checked into revision 10477 - combined query building logic into a single method
Reviewed by:  michael.norman@oracle.com
Tests:  all unit tests pass as expected
Comment 8 David McCann CLA 2012-01-06 11:05:00 EST
Query operation and call generation code has been modded to handle both PL/SQL and Advanced JDBC types in the same codepath.
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:31:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink