You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Ilan Kirsh (JIRA)" <ji...@apache.org> on 2007/10/06 19:59:50 UTC

[jira] Commented: (JDO-542) Adjusting Extent to Java 5.0

    [ https://issues.apache.org/jira/browse/JDO-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532911 ] 

Ilan Kirsh commented on JDO-542:
--------------------------------

We should think what to do with Extent.close(iterator) when the iterator is implicit.

Does calling close / closeAll in Extent is mandatory?
Still closeAll can be used also in that case.

> Adjusting Extent to Java 5.0
> ----------------------------
>
>                 Key: JDO-542
>                 URL: https://issues.apache.org/jira/browse/JDO-542
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2, api2-legacy
>            Reporter: Ilan Kirsh
>
> 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());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.