[hibernate-dev] [Bean Validation] Constraints plural
johng.sst at gmail.com
johng.sst at gmail.com
Wed Feb 18 10:49:56 EST 2009
I'm leaning towards the inner annotations. They fix the um....
non-pretty :>) names and there is no doubt about the Plural intention.
John Griffin
On Feb 18, 2009 8:35am, Emmanuel Bernard <emmanuel at hibernate.org> wrote:
> I have added the following plural forms
>
> AssertFalses
>
> AssertTrues
>
> //Digits to be redefined
>
> Futures
>
> Maxs
>
> Mins
>
> NotNulls
>
> Nulls
>
> Pasts
>
> Patterns
>
> Sizes
>
>
>
> As you can see not all names are pretty. Any improvement proposal?
>
>
>
> Alternatively, we could define inner annotations to define the plural, ie
>
>
>
> @interface Max {
>
> String message() default "...";
>
> Class groups() default {};
>
>
>
> public static @interface Plural {
>
> Max[] value();
>
> }
>
> }
>
>
>
> @Max.Plural( {
>
> @Max(30, groups=JoeSixPack.class),
>
> @Max(100, groups=PowerUser.class)
>
> } )
>
>
>
> WDYT?
>
> _______________________________________________
>
> hibernate-dev mailing list
>
> hibernate-dev at lists.jboss.org
>
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20090218/239022a5/attachment.html
More information about the hibernate-dev
mailing list