I don't see how people would nicely have access to the right bridge  
implementation

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)

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to