Hi All, probably a little out of Struts scope but, not a problem for many of you, since it plugs in struts. I need to code an DAO class that, via JDBC, accesses a database. Database is Oracle 8i. We intend to manage any kind of database data.
My employer suggested my that class could have a principal method execute(...) signed like that: public static HashMap execute(String query, String datasource, String DBuser, String DBpassword, ArrayList parameters); The class accesses PL/SQL stored procedures by means of CallableStatements, which actually hold the business logic. * Returned hashmap contains return values indexed by return parameter name, including arrayList converted form resulsets and * ArrayList parameters holds next info about each parameter: - IN/OUT/INOUT - type - value in order that method can be able to work out the actual CallableStatement. That is the scenario. However, I am not sure about this design, and I have some questions so, I would appreciate opinions. - Firstly, passing parameter types I think is quite messy for the programmer. Furthermore, method can inspect in runtime database column types and cast, or match itself, input parameter types for database types. I would free this (pointless?) load to programmer that use this class. - Maynbe using dynabeans rather than hashmaps in the return from the method, - is good idea to make execute() static? - Does any of you know a open source DAO, or example to look at? Regards, Adolfo. _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

