[Opensource] new multidbobject functionality

Michael Rimov rimovm at centercomp.com
Tue Jul 9 21:39:38 PDT 2002


>MulitDBObject is lacking some of the functionality that DBObject has.
>Specifically the methods and attributes necessary for pagination.  I've
>added a couple of lines to the class and am providing them here for updates
>to this class in future releases:
>
>(These are additions that I made to the 4.02 codebase)
>
>Oh yeah, most of this code comes directly from Peter Pilgrim's work on
>DBObject.  (Thanks, dood)
>
>added:
>protected int offsetRecord attribute
>
>public setOffsetRecord method
>public getOffsetRecord method
>
>and updated the searchAndRetrieve method with the SQL limitation code that
>Peter(?) added to DBObject

Brian, thanks for the code here!  I'll get it checked in soon.



>my coworker Mike Mahon also added the getDBObject (public) method which
>returns the DBObject returned from getByShortName (private method) so that
>you can get at individual DBObjects and use them for updates/deletes.

I THINK a gentleman by the name of Atip already contributed this one into 
CVS.   I'll double-check of course...


On a total side note, I've been thinking about why we can't have DBObject 
and MultiDBObject much more closely related API-wise.  For example: instead of

setField(shortName, fieldName, fieldValue);

add
setField(fieldName,fieldValue);
Where fieldName is of the format:  shortName.fieldName  [Just as it would 
be in standard SQL]

By doing that, I think it would be possible to create a standard interface 
that both DBObject and MultiDBObject implement which would allow us to do 
things like:

-Have DBMaint support MultiDBObjects for DBObject joins.
-Enforce a common interface contract between the two types of objects
-Simplify the MultiDBObject interface.

Is there anything that anybody currently using MultiDBObject would object 
to adding these features? [Current method for setting fields would remain 
intact for at least this version since it's late in the dev cycle for 4.1]

Input would greatly be appreciated!
                                                 -Mike




More information about the Opensource mailing list