db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clute, Andrew" <Andrew.Cl...@osn.state.oh.us>
Subject RE: Pluggable IndirectionHandler
Date Mon, 12 Apr 2004 20:02:28 GMT
Works for me. Thanks for the changes. I agree about not exposing state,
much cleaner this way.

-Andrew

 

-----Original Message-----
From: Thomas Dudziak [mailto:tomdz@first.gmd.de] 
Sent: Monday, April 12, 2004 2:28 PM
To: OJB Developers List
Subject: RE: Pluggable IndirectionHandler

On Mon, 12 Apr 2004, Clute, Andrew wrote:

> Sorry, bad formatting... 
> 
> -----Original Message-----
> From: Clute, Andrew [mailto:Andrew.Clute@osn.state.oh.us]
> Sent: Monday, April 12, 2004 10:29 AM
> To: OJB Developers List
> Subject: RE: Pluggable IndirectionHandler
> 
> Thanks for the update....However, I found a couple private member 
> variables that need to be made protected for subclassing to work:

I added a bit documentation and made the interface more supportive for
subclassing:
 
> IndirectionHandlerDefaultImpl.java:
> private Object _realSubject --> protected Object _realSubject

Does materializeSubject suffice ? It now no longer changes the state but
rather simply returns the loaded subject.

> private Identity _id --> protected Identity _id

There already are getIdentity/setIdentity

> CollectionProxyDefaultImpl.java:
> private Collection m_data; --> protected Collection m_data;

Is it enough to redefine loadData which now returns the loaded elements
rather than changing the state of the proxy ? 

> private int m_size = -1; --> protected int m_size = -1;

Similiar to above with loadSize.


Please check whether these methods work for you, otherwise I'll make the
fields protected (though reluctantly, I don't like exposing state to
subclasses :-).

Tom


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


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


Mime
View raw message