[OFBiz] Dev - Help with implementing Stored Procedures

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - Help with implementing Stored Procedures

Michael Irving

We have an HRMS Application that resides in an Oracle database.  For each entity, there are packages (stored procedures/functions) in the database that create, update, delete and fetch.  For example:

 

Pkg_timesheet.create_enttry(p_date IN DATE, p_emp_no IN NUMBER, p_project_id IN NUMBER, p_hours IN NUMBER, p_success_flag IN OUT NUMBER)

 

We would like to use these APIs from within OFBIZ.  >From what I’ve learned thus far, here are the things we’ll need to do…can someone verify that we are on the right track?:

 

1)     Helper Class

a.      Create a new helper class that uses our stored procedures.

b.      Use GenericDAO as a “template” and modify the methods accordingly to create OracleDAO

c.      Use GenericHelperDAO as a “template” and modify the methods accordingly to create OracleHelperDAO

 

2)     entityengine.xml

a.      Create a new delegator that connects to the Oracle DB Instance

b.      Assign our own Helper Class to the datasource (e.g. org.ofbiz.entity.datasource.OracleHelperDAO)

 

3)     <ofbiz_home>/applications/<application_name>/entitydef/entitymodel.xml

a.      Create the XML for each of our entities

 

4)     <ofbiz_home>/applications/<application_name>/entitydef/entitygroup.xml

a.      Create the XML that groups our entities

 

 

 

-----------------------------------------

Michael Irving

Keynetx, Inc. - Building Solutions for Success

Mobile: (267)474.3564

Fax: (425) 871-2838

email: [hidden email]

 

* * * Visit Our Web Site: http://www.keynetx.net * * *

 

--------------------------------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

 


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Help with implementing Stored Procedures

David E. Jones

If you are using stored procedures it will be database and  
application specific, so I wouldn't bother putting a bunch of effort  
into trying to handle it in a generic way.

Just write some JDBC code in a Java service and call your stored  
procedures directly. This keeps these isolated and "pluggable".

-David


On Aug 20, 2005, at 10:27 AM, Michael Irving wrote:

> We have an HRMS Application that resides in an Oracle database.  
> For each entity, there are packages (stored procedures/functions)  
> in the database that create, update, delete and fetch.  For example:
>
>
>
> Pkg_timesheet.create_enttry(p_date IN DATE, p_emp_no IN NUMBER,  
> p_project_id IN NUMBER, p_hours IN NUMBER, p_success_flag IN OUT  
> NUMBER)
>
>
>
> We would like to use these APIs from within OFBIZ.  >From what I’ve  
> learned thus far, here are the things we’ll need to do…can someone  
> verify that we are on the right track?:
>
>
>
> 1)     Helper Class
>
> a.      Create a new helper class that uses our stored procedures.
>
> b.      Use GenericDAO as a “template” and modify the methods  
> accordingly to create OracleDAO
>
> c.      Use GenericHelperDAO as a “template” and modify the methods  
> accordingly to create OracleHelperDAO
>
>
>
> 2)     entityengine.xml
>
> a.      Create a new delegator that connects to the Oracle DB Instance
>
> b.      Assign our own Helper Class to the datasource (e.g.  
> org.ofbiz.entity.datasource.OracleHelperDAO)
>
>
>
> 3)     <ofbiz_home>/applications/<application_name>/entitydef/
> entitymodel.xml
>
> a.      Create the XML for each of our entities
>
>
>
> 4)     <ofbiz_home>/applications/<application_name>/entitydef/
> entitygroup.xml
>
> a.      Create the XML that groups our entities
>
>
>
>
>
>
>
> -----------------------------------------
> Michael Irving
> Keynetx, Inc. - Building Solutions for Success
> Mobile: (267)474.3564
> Fax: (425) 871-2838
> email: [hidden email]
>
> * * * Visit Our Web Site: http://www.keynetx.net * * *
>
> ----------------------------------------------------------------------
> ----------
> NOTICE: If received in error, please destroy and notify sender.  
> Sender does not waive confidentiality or privilege, and use is  
> prohibited.
>
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment