Hi,

I was just describing what I consider best practise.
I did not know you were looking for the Holy Grail ;-)

So you need a partially loading proxy?
OK here you go:
take a look at tutorial3.html:
http://jakarta.apache.org/ojb/tutorial3.html#using%20proxy%20classes

As you can see it is possible to use either dynamic proxies (that are
generated automatically at runtime) or manually implemented proxies.
You can provide your own proxy implementation that performs any kind of
partial loading.
You have to tell OJB about this proxy in the class-descriptor for your
Customer class:
<class-descriptor
      class="com.my.Customer"
      proxy="com.my.CustomerProxy"
      table="CUSTOMERS"
>

cheers,
Thomas

> -----Urspr�ngliche Nachricht-----
> Von: David Corbin [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 4. September 2002 15:33
> An: OJB Users List
> Betreff: Re: Proxy question
> 
> 
> Having read that thread, I think I understand.  But it's 
> still kind of 
> disappointing.  In the example I gave before,  I don't want 
> my client of 
> Customer to have to deal with different objects for different states. 
>  To him, it should all be Customer objects.  
> 
> I think I'm still searching for the Holy Grail, where 
> persistance is a 
> necessary evil as a result of hardware limitations, and the 
> core part of 
> the system should haven't to be aware of it.
> 
> 
> David
> 
> Thomas Mahler wrote:
> 
> > This is typically addressed by report queries. (check mail 
> archive for 
> > recent postings on this subject).
> >
> >
> >
> > David Corbin wrote:
> >
> >> Is it possible to have a proxy object that has some of the object 
> >> data, but not all of it?  For example, I might want to 
> list a bunch 
> >> of Customers, which means I want to show their name, but only have 
> >> the actual object loaded when the user clicks on the link for a 
> >> specific customer.
> >>
> >>
> >> Thanks.
> >> David
> >>
> >>
> >> -- 
> >> To unsubscribe, e-mail:   
> >> <mailto:[EMAIL PROTECTED]>
> >> For additional commands, e-mail: 
> >> <mailto:[EMAIL PROTECTED]>
> >>
> >>
> >>
> >>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to