|
|
Re: Query's NumberConditions don't support GreaterThan/LessThan? [message #415025 is a reply to message #415015] |
Wed, 28 November 2007 13:33 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Ed, Jasper,
I think clients in the past have used the fact that the precision of numbers
in Java is limited to express > and < using the maximal positive and
negative values of the number type as bounds, as Jasper suggested.
Arguably not very convenient.
And, this doesn't work in Query 1.2 in which the rework of the
NumberCondition as a generic condition now also supports BigInteger and
BigDecimal.
Sounds to me like a worthwhile enhancement request for our Bugzilla.
cW
Ed Merks wrote:
> Jasper,
>
> That would have been handy. I suppose one could argue in favor of
> having both inclusive and exclusive ranges (<= verses <) since that's
> particularly important for floating point numbers where you can't just
> increment the bound to have the same effect. I could imagine using a
> boolean (or two) to define inclusiveness for the bound(s) and using null
> to represent no bound. We'll see what Christian thinks...
>
>
> Jasper wrote:
>> It seems EMF Query's NumberCondition classes only support
>> Between(upperBound,lowerBound) conditions (with Equals being emulated
>> as a Between with upperBound and lowerBound set to the same value).
>> Apparently there's no support for GreaterThan or LessThan... Why is
>> this? (I supposed they could be emulated by using Type.MAX_VALUE and
>> Type.MIN_VALUE for the upper and lower bounds, but wouldn't it make
>> more sense to support > and < explicitly?)
|
|
|
|
Powered by
FUDForum. Page generated in 0.03667 seconds