[hibernate-issues] [Hibernate-JIRA] Created: (BVAL-99) Implement type-safe ConstraintValidator resolution mechanism

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Jan 29 00:30:38 EST 2009


Implement type-safe ConstraintValidator resolution mechanism
------------------------------------------------------------

                 Key: BVAL-99
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-99
             Project: Bean Validation
          Issue Type: New Feature
          Components: ri-general
            Reporter: Emmanuel Bernard


I did implement the embryo that determine the type of a given ConstraintValidator
See ValidatorTypeHelper class and its test.

With this type, the algo needs to find the best matching ConstraintValidator for a given declaration.
Here is a proposal:
For a given type T when a constaint is applied,
List all CV whose type U is such that U.isAssignableFrom(T) is true
then for each element U of this list:
 - if another element in the list is such that U.isAssignableFrom(V), remove U
if there is more than one remaining element => raise the AmbiguousException

Also when a Constraint is analyzed, if 2 CV target the same type, an exception should be raised.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list