db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <martin.ka...@curalia.se>
Subject Re: PagingIterator: not really a scrollcursor!
Date Thu, 18 Dec 2003 15:21:53 GMT
Gelhar, Wallace Joseph wrote:

> Perhaps if you intend to guarantee that all Iteraters returned by the PB are OJBIterators,
the getIterator...() methods should have a return type of OJBIterator.  This allows me as
an application programmer to program to the OJBIterator Interface without concern of the OJB
internals changing the type of the Iterator returned.  OJBIterator still implements Iterator
so it does not break binary compatibility with legacy code.

I like this a lot!

It's a bit shaky to a cast to OJBIterator to get access to e.g. 
releaseDbResources. It would feel much "safer" if the OJB PB-API could 
promise that each concrete iterator returned would in fact be 
implementing the OJBIterator interface.

(And it would prevent anyone from adding a new Iterator that didn't.)

Just my 5 SEK... ;-)
  /Martin

-- 
Martin Kalén
Curalia AB              Web:  http://www.curalia.se
Orrspelsvägen 2B        Mail: info@curalia.se
SE-182 79  Stocksund    Tel:  +46-8-410 064 40


---------------------------------------------------------------------
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