What is it that you are trying to accomplish with this? Larry
On 2/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello developers > > Can you support getting context (id) informations within a DAO impl > instance? > > There is only a access to the daoManager instance that is set in the > constructor of each DAO implementation in > class "XMLDaoManagerBuilder" in method "private DaoImpl parseDao(Element > element, StandardDaoManager daoManager, DaoContext daoContext) > {...Constructor constructor = daoClass.getConstructor(new > Class[]{DaoManager.class});...}" > > If I have access to the context (id) I can call other DAO impls within a DAO > impl with the same context id. > > I think there are many ways to support that: > > 1. add a second constructor to DAO impls that sets the DaoContext in > addition to the DaoManager (so I can call the method > this.daoManager.getDao(<DAO_name>.class, this.daoContext.getId()) > 2. add a method to DaoManager that returns the context id for current DAO > instance (so I can call the method this.daoManager.getDao(<DAO_name>.class, > <requested_context_id>) > 3. add a method to DaoManager that returns a DAO instance within the same > context of current DAO instance (like > this.daoManager.getDao(<DAO_name>.class, this) > > What do you think of this? > > Best regards > Manuel Rädle > Entwicklung > > PRÜFTECHNIK Condition Monitoring > Franz-Bayer-Straße 14 > D-88213 Ravensburg > http://www.pruftechnik.com > Tel: +49 (0)751 76956-12 > Fax: +49 (0)751 76956-79 > > ---------------------------------------------------------------------------------------------------------