[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-366) Create some specialized converter for number

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Nov 2 12:08:06 EST 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-366?page=comments#action_25078 ] 

Emmanuel Bernard commented on ANN-366:
--------------------------------------

Handling signed elements is not easy.
Basically we need a header such as negative_header < positive-header through natural comparator
Plus for negative numbers we have to invert them so that -3 < -2 and not the other way around with a natural omparator

@Pad(shift=4, signed=true)
or
@Pad(max=9999, signed=true)

Note that decimals are harmless

Also the Lucene recommendation is to use a Query filter rather than a RangeQuery, but ihis will defect the firstResult / maxResult

> Create some specialized converter for number
> --------------------------------------------
>
>          Key: ANN-366
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-366
>      Project: Hibernate Annotations
>         Type: New Feature

>   Components: lucene
>     Reporter: Emmanuel Bernard
>      Fix For: 3.3.0.Alpha1

>
>
> Typically, the numbers are padded to match the alphabetical ordering
> 007
> 023
> 234
> This can be done manually through a converter but this would be nice to have it built-in

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list