I have a question. When you said to add the map at the ValidatorFactory
level, did you mean to add it to ValidatorFactoryImpl? As I can see, getting
the validators of built in constraints happens in ConstraintDescriptorImpl,
which is used only by the BeanMetaDataImpl. Do I put the map in
ConstraintDescriptorImpl, or shall I put it somewhere else?
Regards,
Alaa Nassef
On Mon, Feb 2, 2009 at 1:31 PM, Emmanuel Bernard <emmanuel(a)hibernate.org>wrote:
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.
On Feb 2, 2009, at 12:28, Emmanuel Bernard wrote:
I don't see the need for reflection. Just add them to the map, period.
>
> You might want to store the map in the ValidatorFactory instead of a
> static, not sure.
>
> On Feb 2, 2009, at 12:22, Alaa Mohsen wrote:
>
> Hello All,
>> What's the status of BVAL-90 (Stop using a properties file for
>> built-in constraints and move to a list in Java)? I'm thinking of
>> implementing it using a static map that's get filled on class loading. I
>> wanted to have a clean implementation using reflection, but can't find a
>> clean solution to get the classes within a package. I'm also thinking of
>> using an enum instead of a map. What do you think?
>>
>> Regards,
>> Alaa Nassef
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/hibernate-dev
>