db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join
in Search
More Search Options

Return a List usable without the ObjectContainer which retrieved it

Last post 08-31-2008, 06:04 AM by mjablonski. 1 replies.
Sort Posts: Previous Next
  •  08-30-2008, 03:47 PM 50848

    Return a List usable without the ObjectContainer which retrieved it

    Hello,

     I have just discovered DB4O and I would like to test it with an application written in Java. This application uses DAOs.

    The findAll methods of the DAOs return a List which will be used after the closing of the ObjectContainer which retrieved it, so I can't return the ObjectSet returned by get. For the moment I create at the end of the methods an ArrayList, passing the ObjectSet returned by get to the constructor of ArrayList. Is there a better way to do it?

    Thanks in advance for your help.

    Richard

  •  08-31-2008, 06:04 AM 50853 in reply to 50848

    Re: Return a List usable without the ObjectContainer which retrieved it

    rgrin:
    For the moment I create at the end of the methods an ArrayList, passing the ObjectSet returned by get to the constructor of ArrayList. Is there a better way to do it?

    I'm not aware of a better approach to transfer an ObjectSet into a "native" List-implementation. I'm doing this kind of conversion for years now and didn't had any problems so far. What might be wrong with it?

    Cheers; Maik


    http://db4o.blogspot.com/
View as RSS news feed in XML