Re: Comparitor

[email protected] Wed, 25 Mar 2009 10:37:57 +1000
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
Would it also be possible to move the null processing in compareField to SFieldScalar?  Seems to be a lot of copied code amongst the subtypes.   Eg. SFieldString.compareTo is identical to SFieldInteger.compareTo.

Anthony


>I have also removed the Comparable interface from SRecordInstance.
>You're right that instance need not to have a "natural" order.
>The drawback is that a SRecordComparator based on primary keys is not
>strickly consistent with equals, because two records with null key will
>be the same to SRecordComparator (compare returns 0), while they are NOT
>equal.
>The advantage is that is removes cryptic counter (nullKeysIndex) from
>SDataSet and SRecordInstance. I guess the advantage overweights the
>drawback. (I added a warning in SRecordComparator's javadoc)
>
>Regards,
>Franck

Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/