You may need to employ a custom type map if you are using a standards-based SQL type, and are connecting to databases that use proprietary data types.
To specify a custom type map:
Create a custom type map class which would define the mappings.
Compile the class.
Put the type map class is in the classpath.
Close JDeveloper.
In a text editor, open jdeveloper.ini in the [jdev_home]\bin directory.
Append the IDECLASSPATH entry with the directory/Zip/JAR file where your custom type map class can be found.
You can give the absolute path (C:\JDeveloper\..) or follow relative path. For example:
[Java_Global]
IDEClassPath=..\classes;..\myclasses;
Make the type map class accessible from the wizard.
In a text editor, open the jbo.properties file in the [jdev_home]\lib directory.
Add the line oracle.jbo.TypeMap#=<shortname>,<fullclassname>
where:
|
# |
An integer which you increment for each new type map class |
|
<shortname> |
The name of the type map that shows up in the wizard |
|
<fullname> |
The full path of the type map class |
For example:
oracle.jbo.TypeMap1=Access,AccessTypeMap
oracle.jbo.TypeMap2=DB2,Db2TypeMap
Note: In the above examples, notice that AccessTypeMap.class and DB2TypeMap.class are referred to by class name only (no path or .class extension). Both classes are assumed to be in the classpath already.
Start JDeveloper and create a new Business Component project.
In the Business Component Project Wizard's Connection page, select your type map from the drop down box.
When you create business components, the newly created components will have the type mappings specified in your class.