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(a)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.