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 Jacques-Olivier Goussard <jo...@nuance.com> on 2002/12/04 17:12:33 UTC

Declarative mapping

Hi
I'm completely new to OJB thus this maybe a very simple
question, but anyhow: can OJB handle declarative mappings ?
I.e. it seems that for OJB (as for a lot of other frameworks
of this kind), you always need to have a class implementation
that match to your DB table. When it comes to integration,
when you want someone to integrate its table to your app (that's
my case), it means this integrator needs to actually write
(simple - but still) code.
I'm searching for a framework were the integrator would be
able to declaratively do this mapping.
For ex, in OJB, an implementation would be to allow for
something like:
  <!-- Definitions for org.apache.ojb.broker.Product -->
   <class-descriptor
      class="ClassFactory.getInstance(ClassFactory.ProductClass)"
      table="PRODUCT"
   >
   ...
OJB would then use the ClassFactory.getInstance method to 
instantiate mapping classes. Mapping classes would simply implement
the DynaBean interface and be declaratively configured (as
Struts does for DynaActionForms).
Can OJB handle this ? If no, what would be the effort needed to
handle it ?
Thanks a lot
       Jacques-Olivier