Apache JDO Project - Adjusting Extent to Java 5.0

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > October 2007 > Adjusting Extent to Java 5.0





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Adjusting Extent to Java 5.0
Ilan Kirsh

2007-10-06, 1:11 pm

Hi,

It might make sense to update Extent:

public interface Extent<E> extends Iterable<E> {
:
:
}

and in PersistenceManager:

Extent<T> getExtent (Class<T> cls, boolean subclasses);
Extent<T> getExtent (Class<T> cls);

This way, iteration over all the instances of a class could be simplified:

for (Person person : pm.getExtent(Person.class))
System.out.println(person.getName());

Ilan Kirsh
ObjectDB Software
http://www.objectdb.com







Craig L Russell

2007-10-06, 1:11 pm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com