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 Re: SingleFieldIdentity : implement Comparable
Date Wed, 25 Jun 2008 22:54:05 GMT
I think it's a fine idea.

But think about ObjectIdentity in which the compareTo method would  
have to delegate to the Object, which itself would have to implement  
Comparable. And throw some exception at runtime if it didn't implement  
Comparable. Or just disallow ObjectIdentity from being used...


On Jun 25, 2008, at 5:46 AM, Andy Jefferson wrote:

> Does anybody have an objection to changing the "SingleFieldIdentity"
> (javax.jdo.identity) classes so that they implement Comparable ?
> Adding it means that they can be stored in a TreeSet, whereas  
> currently they
> cannot.
> -- 
> Andy  (DataNucleus - http://www.datanucleus.org)

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!

View raw message