Wednesday, October 10, 2012

Enabling Oracle Data types in the ADF BC

Hi All,

       When you create a View Object in the ADF BC, you can select the data type for that attribute. Some times you may expect to select the Object type also. If you create any view object , entity object or any BC objects, it will ask for the db connection, there a drop down is there to select the Type Map.

 If you select the Java as type Map, you will get only java types in the drop down while creating the BC objects.






 

If you choose , Oracle as Type Map form the drop down, you will get more types including java types,

 
Suppose, its created with the Default java type means, you can't change it form the wizard further. For that check the Model project properties , choose Business Components node, the Drop down has  disabled.

 

To make the change, you have to edit the Model.jpx manually.
These actual entries will be updated in the Model.jpx file.. So open the file and go to source, change the TypeMapEntries to 'Oracle' manually like below
 
 

 Note: After the changes in th Model.jpx, close the application and re-open. and check the types.

After changing to Oracle Type map, you will get the Oracle types also like below :-)





For more about creating Custom data types , check this

 http://docs.oracle.com/cd/E25178_01/web.1111/b31974/bcadveo.htm#sm0326
 http://www.baigzeeshan.com/2011/07/working-with-domain-type-in-adf.html