[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: beginner question: Ozone & java.util collections
Thank you for your reply, I apologize for not formulating my question more
I was thinking of the case where the collection would be a database class.
Our application has an entry point to the database which is a Repository
class that returns Maps of business objects (e.g. Customers, Products) with
keys of name or id. If my understanding is correct a similar implementation
would require that the Maps be database classes since the Maps are
manipulated directly. Otherwise Ozone would return a serialized version of
the Map object to the client rather than a proxy and therefore adds &
deletes to the Map on the client wouldn't be reflected in the Map object in
the Ozone database.
One option would be to have a wrapper database class that passed the method
calls through to the Map in an instance variable. Perhaps that is the best
Are there other options?
Such as making a java.util.TreeMap a database class so one could have:
Map customers = (Map)db.objectForName ("customers");
and do read, adds & deletes.
>On Wed, 14 Jun 2000, Don Berendsen wrote:
> > Is there an Ozone example available that uses java collections (e.g.
> > java.util.TreeSet) rather than the DXLib collections?
>You may use Java2 collections exactly as the Dx collections. I think no
>is needed. Just type HashSet instead of DxHashSet for example (and change
>the enumerate/iterate code ;)
> > As I understand the documentation all database classes in Ozone must
> > implement OzoneCompatible and the remote interface and be postprocessed.
> > understand how to write the remote interface but not how to do the
> > collection implementation.
>Yes, all *database* classes has to postprocessed. But usually collections
>not direct database classes. But they are members of database classes. In
>case nothing special has to be done with them.
> > Any guidance would be greatly appreciated.
> > cheers,
> > donb
> > BTW, I'm curious why the DXLib classes were used for Ozone instead of
> > standard Java collections. What's 'nifty' about them that isn't 'nifty'
> > about the Java collections?
>We started ozone with JDK1.0!
>On the other hand we can change the implementation if needed. For example
>all array index checks for performance reasons.
>Falko Braeutigam mailto:firstname.lastname@example.org
>softwarebuero m&b (SMB) http://www.softwarebuero.de
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com