Re: Collection.size behavior
Mark Space wrote:
Kenneth P. Turvey wrote:
On Sun, 04 May 2008 11:26:20 -0400, Arne VajhQj wrote:
I agree. I must admit that I have never seen a non-memory backed
collection.
I've thought about writing one on several occasions for various
reasons. I've never actually done it, but it does come up with
regularity. I'm sure others have actually implemented them.
If for no other reason than the limitation on size(), I think a
different API would be the best way to start.
Given that such an API would almost certainly have to deal with persistent
stores, and that such collections actually are persistence abstractions, we
could call the API the Java Persistence API, and have it manifest a library to
interface an object-oriented, collection-based model to an arbitrary
persistence engine. We should make it annotation- or descriptor-file-based at
the architect's will, and it can then use more-or-less POJO types to represent
the entities to be collected. This whole JPA layer could abstract the mapping
between the backing store and the object model. In ideal world such a thing
would already be standardized,
<http://java.sun.com/javaee/5/docs/tutorial/doc/bnbpy.html>
and have at least two solid, free implementations,
<http://www.hibernate.org/>
<http://openjpa.apache.org/>
<https://glassfish.dev.java.net/downloads/persistence/JavaPersistence.html>
and perhaps work well with, even be included as part of existing application
servers and frameworks.
<https://glassfish.dev.java.net/>
<http://www.springframework.org/>
<http://www-306.ibm.com/software/webservers/appserv/was/>
--
Lew