I would not want Properties but Map<String,String> might be ok. Make sure that built-in types do not pass actual objects from the bridge factory though.
On 8 févr. 2012, at 12:05, 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@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev