db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mogley" <michael.mog...@verizon.net>
Subject Re: rowsets
Date Thu, 19 Dec 2002 19:18:22 GMT
Hi Thomas,

Thanks for the feedback.  Why should the broker handle rowsets?  The rowsets
are simply sources of information from which to build objects.  You still
need to materialize the object.  And once you do, that object is likely to
have relationships to other objects that are lazily-traversed.  Seems to me
some broker is integral to this, no?

Michael

----- Original Message -----
From: "Mahler Thomas" <thomas.mahler@itellium.com>
To: "'OJB Developers List'" <ojb-dev@jakarta.apache.org>
Sent: Thursday, December 19, 2002 12:50 AM
Subject: AW: rowsets


> Hi Michael,
>
> > All,
> >
> > How would you feel about supporting RowSets in Ojb?  By that,
> > I mean being able to do something like:
> >
> >     RowSet rowset = getRowSetFromXmlFile();
> >
> >     Iterator iterator = broker.getIteratorForRowset(Class
> > objectClass, rowset);
>
> This could be easily achieved by building a RowReader that can handle
> RowSets.
> But I don't see why the PersistenceBroker should be responsible for
handling
> such RowSets?
>
> >
> > The source of the rowset could be absolutely anything
> > imaginable, so don't get hung up on the Xml example.
> >
> > It would also be cool to do something like:
> >
> >     Iterator iterator = broker.getIteratorForQuery(Query
> > query, Class rowsetClass);
> > Here, the broker would instantiate an instance of the request
> > RowSet implementation class and populate it with the results
> > of the query.  This would make it easy to add external
> > functionality such as logical cursors, or  -- to use the Jdbc
> > 2.0 terminology -- disconnected scrollable ResultSets that
> > materialize rows on-demand.
>
> Did you have a look at the ManageableCollection stuff?
>
(http://jakarta.apache.org/ojb/apidocs/org/apache/ojb/broker/ManageableColle
> ction.html)
> IMO it would be easy to build this mechanism by defining an Iterator class
> (Say RowsetIterator )that is backed by a ManageableCollection.
> You can then use
> PersistenceBroker.getCollectionByQuery(RowsetIterator.class, query) to get
> your Iterator
>
>
http://jakarta.apache.org/ojb/apidocs/org/apache/ojb/broker/PersistenceBroke
>
r.html#getCollectionByQuery(java.lang.Class,%20org.apache.ojb.broker.query.Q
> uery)
>
> cheers,
> Thomas
>
>
>
> > Michael
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:ojb-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ojb-dev-help@jakarta.apache.org>
>


Mime
View raw message