db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-548) PM.getManagedObjects() : access to the objects enlisted in a transaction
Date Mon, 26 Nov 2007 23:51:44 GMT

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

Craig Russell commented on JDO-548:
-----------------------------------

After looking at this in more detail, I don't think we can use type <T> in the signature
due to capture conversions and least upper bounds issues.

Here's what I've been able to get to work:

Set getManagedObjects(); 
Set getManagedObjects(EnumSet<ObjectState> states); 
Set getManagedObjects(Class... classes); 
SetSet getManagedObjects(EnumSet<ObjectState> states, Class... classes); 

With this, we need to define the behavior if states and/or classes is empty or null:

If states is empty (states.size() == 0) or null, instances in all states are returned. If
classes is empty (classes.size() == 0) or null, managed instances of all types are returned.


> PM.getManagedObjects() : access to the objects enlisted in a transaction
> ------------------------------------------------------------------------
>
>                 Key: JDO-548
>                 URL: https://issues.apache.org/jira/browse/JDO-548
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, api2-legacy, specification
>            Reporter: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: api2-legacy.managedobjects.patch, api2.managedobjects.patch
>
>
> It would be desirable to provide access to the objects enlisted in the transaction of
a PersistenceManager. It is proposed that this be via the following methods on javax.jdo.PersistenceManager.
> api2
> Collection getManagedObjects(); // Return all enlisted objects
> Collection getManagedObjects(ObjectState ... states); // Return enlisted objects in the
specified states
> api2-legacy
> Collection getManagedObjects(); // Return all enlisted objects
> The return type could just as easily be Object[].

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


Mime
View raw message