You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by De...@richer.ca on 2006/04/24 18:20:23 UTC

Returning DynaBeans

I am interested in finding out more information about OJB's support of the 
commons-beanutils package.  Is it possible to configure OJB to return 
instances of DynaBeans instead of instances of POJOs?  This would greatly 
reduce the amount of code required to support our persistence layer ... 
basically it would be reduced to ojb class descriptors for each object. 
The persistence broker operations getObjectByQuery for example would need 
to know what type of object I am searching for (so it can look up the 
appropriate class descriptor), but then it would return a DynaBean holding 
the marshalled object.  Is this possible?  It would remove nearly all of 
my redundant persistence layer code!

Thanks,
Phil

Re: Returning DynaBeans

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi phil,

we could return DynaBeans for ReportQueries instead of Object[].
i'm not sure if DynaBeans are useful for normal queries.

jakob

Armin Waibel wrote:
> Hi Phil,
> 
> DenisP@richer.ca wrote:
>> I am interested in finding out more information about OJB's support of 
>> the commons-beanutils package.  Is it possible to configure OJB to 
>> return instances of DynaBeans instead of instances of POJOs? 
> 
> This is (currently) not possible.
> 
>> This would greatly reduce the amount of code required to support our 
>> persistence layer ... basically it would be reduced to ojb class 
>> descriptors for each object. The persistence broker operations 
>> getObjectByQuery for example would need to know what type of object I 
>> am searching for (so it can look up the appropriate class descriptor), 
>> but then it would return a DynaBean holding the marshalled object.  Is 
>> this possible?  It would remove nearly all of my redundant persistence 
>> layer code!
> 
> Sorry I never used DynaBeans. But I think this will not be trivial. 
> Could you give me hint how OJB should return DynaBeans instead of mapped 
> persistence capable objects?
> 
> regards,
> Armin
> 
>>
>> Thanks,
>> Phil
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Returning DynaBeans

Posted by Armin Waibel <ar...@apache.org>.
Hi Phil,

DenisP@richer.ca wrote:
> I am interested in finding out more information about OJB's support of the 
> commons-beanutils package.  Is it possible to configure OJB to return 
> instances of DynaBeans instead of instances of POJOs? 

This is (currently) not possible.

> This would greatly 
> reduce the amount of code required to support our persistence layer ... 
> basically it would be reduced to ojb class descriptors for each object. 
> The persistence broker operations getObjectByQuery for example would need 
> to know what type of object I am searching for (so it can look up the 
> appropriate class descriptor), but then it would return a DynaBean holding 
> the marshalled object.  Is this possible?  It would remove nearly all of 
> my redundant persistence layer code!

Sorry I never used DynaBeans. But I think this will not be trivial. 
Could you give me hint how OJB should return DynaBeans instead of mapped 
persistence capable objects?

regards,
Armin

> 
> Thanks,
> Phil



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org