Apache JDO Project - [jira] Commented: (JDO-548) PM.getManagedObjects() : access to the

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > November 2007 > [jira] Commented: (JDO-548) PM.getManagedObjects() : access to the





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 [jira] Commented: (JDO-548) PM.getManagedObjects() : access to the
Craig Russell (JIRA)

2007-11-26, 7:11 pm


[ https://issues.apache.org/jira/brow...action_12545656 ]

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

If we want to cater for the most common cases, we could add these methods:
<T> Set<T> getManagedObjects(EnumSet<ObjectState> states, Class<T> clazz);
<T> Set<T> getManagedObjects(Class<T> clazz);

This avoids the capture conversion and least upper bounds issues and avoids a compile time warning: [unchecked] unchecked conversion in the simple case where one class is asked for. But it bloats the API.

My suggestion after all this is to add to the API just these four methods:
Set getManagedObjects();
Set getManagedObjects(EnumSet<ObjectState> states);
Set getManagedObjects(Class... classes);
Set getManagedObjects(EnumSet<ObjectState> states, Class... classes);


> 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.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com