Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369539

Summary: DBWS: Need to remove instanceof checks in the design time code
Product: z_Archived Reporter: David McCann <david.mccann>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.mccann, michael.norman
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
DBWS Builder changes
none
DDL Parser changes
none
clean instanceof checks
none
clean instanceof checks (2) none

Description David McCann CLA 2012-01-24 10:55:36 EST
We should add boolean methods to org.eclipse.persistence.tools.oracleddl.metadata.CompositeDatabaseTypeBase that indicate ObjectType, VArrayType, etc. such that we can avoid the numerous instancof checks throughout the code.
Comment 1 David McCann CLA 2012-02-22 14:58:35 EST
Created attachment 211445 [details]
DBWS Builder changes

Makes use of the new isXXX methods to reduce the number of 'instanceof' checks.
Comment 2 David McCann CLA 2012-02-22 15:00:54 EST
Created attachment 211446 [details]
DDL Parser changes

Added isXXX methods to CompositeDatabaseType (class & interface) for each composite database type.

In addition, isXXX methods were added to ScalarDatabaseType (class and interface) for all of the scalar types.

The number of 'instanceof' checks in the builder package is reduced by 85 (104 down to 19).
Comment 3 David McCann CLA 2012-02-22 15:04:00 EST
There were also a number of small changes where 'instanceof' checks were being performed unnecessarily.
Comment 4 Mike Norman CLA 2012-02-23 17:36:31 EST
Created attachment 211542 [details]
clean instanceof checks

alternate version of previous patch
Comment 5 Mike Norman CLA 2012-02-23 17:37:10 EST
Created attachment 211543 [details]
clean instanceof checks (2)

alternate version of previous patch
Comment 6 Mike Norman CLA 2012-02-24 14:10:23 EST
fixed in Oracle DDL Parser (git) and in DBWSBuilder (svn)
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:23:18 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink