db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject [VOTE] Add convenience methods deleteObjectById
Date Fri, 09 Mar 2007 03:08:13 GMT
Please vote for

[ ] Proposal A void deleteObjectById
[ ] Proposal B long deleteObjectById
[ ] Proposal C (do nothing)

This vote will close Monday 12-Mar-2007.

Please see https://issues.apache.org/jira/browse/JDO-469

I'd like to discuss adding the methods to PersistenceManager:

Both Proposals A and B follow the basic rules of deletePersistent,  
with differences if the object identified by the oid is not persistent.

Proposal A

proposed by Matthew Adams:
void deleteObjectById(Class cls, Object key);
void deleteObjectById(Object oid);
void deleteObjectsById(Collection oids);
void deleteObjectsById(Object[] oids);

With proposal A, any object that cannot be deleted would throw an  
exception similar to what is done with deletePersistent.

Proposal B

I think we might want to allow for the possibility that it was not  
possible to delete all the requested items, so add a return value  
with the number of objects actually deleted:
long deleteObjectById(Class cls, Object key);
long deleteObjectById(Object oid);
long deleteObjectsById(Collection oids);
long deleteObjectsById(Object[ ] oids);

Proposal C

do nothing

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message