[hibernate-dev] [HSEARCH] Geospatial indexing and queries
    Hardy Ferentschik 
    hardy at hibernate.org
       
    Wed Dec 21 11:43:48 EST 2011
    
    
  
On Dec 21, 2011, at 5:34 PM, Emmanuel Bernard wrote:
> 
> On 21 déc. 2011, at 17:30, Hardy Ferentschik wrote:
> 
>>> 
>>> But we can reduce the number of methods called by doing something like this
>>> 
>>> builder
>>>   .spatial()
>>>       .forLocation("location")
>>>       .within(500, Unit.KM)
>>>           .ofLatitude(48.8d).andLongitude(2.29d)
>>>       .createQuery();
>>> 
>>> Would you like it better?
>> 
>> much actually :-)
> 
> If we go that way, we could even make the alternative model more explicit as well
> 
> builder
>   .spatial()
>       .forLocation("location")
>       .within(500, Unit.KM)
>           .ofCoordinates(coordinates)
>       .createQuery();
I agree with Sanne. Best looking so far
    
    
More information about the hibernate-dev
mailing list