[hibernate-dev] [infinispan-dev] [HSearch] DSL for Lucene queries (was: Re: Query module new API and configurations)

Emmanuel Bernard emmanuel at hibernate.org
Tue Sep 8 09:02:40 EDT 2009


I was expecting to guess the right type from the property name / field  
name.

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