[hibernate-dev] [infinispan-dev] [HSearch] DSL for Lucene queries (was: Re: Query module new API and configurations)
Sanne Grinovero
sanne.grinovero at gmail.com
Tue Sep 8 09:07:30 EDT 2009
2009/9/8 Emmanuel Bernard <emmanuel at hibernate.org>:
> I was expecting to guess the right type from the property name / field name.
>
IMHO we are confusing 2 different discussions:
one about selecting StringBridges
one about selecting Analyzers;
StringBridges can be guessed from the JavaType, Analyzers from the annotations.
I was proposing this typesafe API for StringBridges now.
> On 8 sept. 09, at 14:51, Sanne Grinovero wrote:
>
>> 2009/9/3 Emmanuel Bernard <emmanuel at hibernate.org>:
>>>
>>> I don't see how people would nicely have access to the right bridge
>>> implementation
>>>
>>
>> I did't mean to give a reference the the right bridge, just that if people
>> were defining a custom bridge, they may use it.
>> If they don't specify bridge, we select the appropriate one basing on the
>> type
>> provided.
>>
>> By selecting I mean using the ones in "builtInBridges" map in
>> BridgeFactory;
>> we could use the map by reading the type at runtime or overload the
>> method:
>>
>> <T> void from(T lowerBoundary, StringBridge<T> bridge){
>> ..
>> }
>> void from(int lowerBoundary){
>> from( lowerBoundary, BridgeFactory.INTEGER);
>> }
>> void from(boolean lowerBoundary){
>> from( lowerBoundary, BridgeFactory.BOOLEAN);
>> }
>>
>> It's a bit verbose for us, but should be good to use.
>
>
More information about the hibernate-dev
mailing list