<div dir="ltr">I have a question. When you said to add the map at the ValidatorFactory level, did you mean to add it to <span style="font-family: courier new,monospace;">ValidatorFactoryImpl</span>? As I can see, getting the validators of built in constraints happens in <span style="font-family: courier new,monospace;">ConstraintDescriptorImpl</span>, which is used only by the <span style="font-family: courier new,monospace;">BeanMetaDataImpl</span>. Do I put the map in <span style="font-family: courier new,monospace;">ConstraintDescriptorImpl</span>, or shall I put it somewhere else?<br>
<br>Regards,<br>Alaa Nassef<br><br><div class="gmail_quote">On Mon, Feb 2, 2009 at 1:31 PM, Emmanuel Bernard <span dir="ltr">&lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Actually I am sure now, you have to store the list in a Map at the ValidatorFactory level because the list of validators can be overridden in XML.<div><div></div><div class="Wj3C7c"><br>
<br>
On &nbsp;Feb 2, 2009, at 12:28, Emmanuel Bernard wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I don&#39;t see the need for reflection. Just add them to the map, period.<br>
<br>
You might want to store the map in the ValidatorFactory instead of a static, not sure.<br>
<br>
On &nbsp;Feb 2, 2009, at 12:22, Alaa Mohsen wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello All,<br>
 &nbsp; &nbsp;What&#39;s the status of BVAL-90 (Stop using a properties file for built-in constraints and move to a list in Java)? I&#39;m thinking of implementing it using a static map that&#39;s get filled on class loading. I wanted to have a clean implementation using reflection, but can&#39;t find a clean solution to get the classes within a package. I&#39;m also thinking of using an enum instead of a map. What do you think?<br>

<br>
Regards,<br>
Alaa Nassef<br>
_______________________________________________<br>
hibernate-dev mailing list<br>
<a href="mailto:hibernate-dev@lists.jboss.org" target="_blank">hibernate-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hibernate-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/hibernate-dev</a><br>
</blockquote>
<br>
_______________________________________________<br>
hibernate-dev mailing list<br>
<a href="mailto:hibernate-dev@lists.jboss.org" target="_blank">hibernate-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hibernate-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/hibernate-dev</a><br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>