[hibernate-dev] [HSEARCH] Geospatial indexing and queries

Emmanuel Bernard emmanuel at hibernate.org
Mon Dec 19 12:39:40 EST 2011

On 19 déc. 2011, at 18:30, Sanne Grinovero wrote:

> About ".of(JTSLocation.class, jtsObject)"
> nice trick, is the idea that you then return an object having a JTS
> specific interface to ask for the additional parameters and options?
> But I assume this is no longer relevant.

It's more that the JTSLocation would host the jts object type as generic and that we could infer and constraint it for the jtsObject parameter

someDSLContext of(T, Location<T>);

interface Location<T> {    

But we could also make the Location interface convert data into `Coordinates` or lat / log

interface Location<T> { 
    toCoordinates(T object);   

But to be honest, I like your idea of a static helper method better. It find it reads better in the DSL.


More information about the hibernate-dev mailing list