My scenario is simple:

MyInterface
MyAbstractClass implements MyInterface
MyClass extends MyAbstractClass
(and a few more subclasses)

where

-all of them are provided with ojb.class, mapped to the same table
-MyAbstractClass contains artificial primary key and ojbConcreteClass field
and several ojb.xxx (fields, refs., collections, nested..)
-MyClass contains MyClass() constructor and another ojb.xxx

I assume, this is not the special case, where the factory would be
necessary, is it?

David

----- Puvodn� zpr�va ----- 
Od: "Thomas Dudziak" <[EMAIL PROTECTED]>
Komu: "OJB Users List" <[EMAIL PROTECTED]>
Odesl�no: 28. cervna 2004 12:07
Predmet: Re: (xdoclet -> torque) with reference to interface


> David Zejda wrote:
>
> >Do I need factory-class/factory-method if I have ojbConcreteClass?
> >I thougt, if the ojbConcreteClass is provided, objects will be
instantiated
> >by Class.forName(ojbConcreteClass).newInstance(), so the zero-argument
> >constructor would be sufficient..
> >But I may be wrong...
> >
> >
> You need ojbConcreteClass if you map multiple classes onto the same
> database table. You may need factory-class/factory-method when working
> with interfaces, but only in special cases.
>
> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to