[hibernate-dev] [Search] ParameterizedBridge API
Hardy Ferentschik
hardy at hibernate.org
Wed Feb 8 08:42:37 EST 2012
+1
On Feb 8, 2012, at 5:05 AM, Sanne Grinovero wrote:
> The current API reads:
>
> public interface ParameterizedBridge {
> //TODO inject Properties? since the annotations cannot support Object
> attribute?
> void setParameterValues(Map parameters);
> }
>
> Shall we apply the TODO, or at least change it to specify the expected
> Map types?
>
> public interface ParameterizedBridge {
> void setParameterValues(Map<String,String> parameters);
> }
>
> Using generics we would keep backwards compatibility.
>
>
> I'm looking at this because we make type mistakes ourselves; for
> example the example
> PaddedIntegerBridge is broken:
>
> public void setParameterValues(Map parameters) {
> Object padding = parameters.get( PADDING_PROPERTY );
> if (padding != null) this.padding = (Integer) padding; <<<<<<< Cast exception!
> }
>
>
> Cheers,
> Sanne
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list