[hibernate-dev] [infinispan-dev] [HSearch] DSL for Lucene queries (was: Re: Query module new API and configurations)
emmanuel at hibernate.org
Thu Sep 3 19:12:10 EDT 2009
I don't see how people would nicely have access to the right bridge
On 3 sept. 09, at 17:30, Sanne Grinovero wrote:
>> That would be cool but realistically we need to accept Object
>> unless somehow
>> we can convey the "expected" type(s) of a field bridge using
>> generics or
>> something. SOmebody has an idea on how the API would look like?
>> probably something like
>> <T> on(String field, Class<T>) ...
>> on("field", Date.class).from(new Date()).
> I didn't mean that the method signature should be aware of the type,
> Object is fine;
> from( Object lowerBoundary ); //automatically finds out the
> StringBridge from the BridgeFactory
> from( Object lowerBoundary, StringBridge ); //overrides ths
> StringBridge selection
> Even better making StringBridge generic we get typesafety:
> <T> void from(T lowerBoundary, StringBridge<T> bridge)
More information about the hibernate-dev