Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Gunnar Morling
2013/9/4 Hardy Ferentschik > > On 3 Jan 2013, at 4:10 PM, Emmanuel Bernard > wrote: > > > Something like c makes sense. > > It similar to the notion of converter in JPA. > > > > But why not the following style of interfaces > > > >interface Convert { > >To convert(From); > >} > >

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Hardy Ferentschik
On 3 Jan 2013, at 4:10 PM, Emmanuel Bernard wrote: > Something like c makes sense. > It similar to the notion of converter in JPA. > > But why not the following style of interfaces > >interface Convert { >To convert(From); >} Going back to Emmanuel mentioning @Convert. I am

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Hardy Ferentschik
> Another use case may be Optional from JDK 8: > > @Size(min = 5) > Optional name; Is another upcoming change not "type annotations" which would allow Optional<@Size(min = 5) String>? That would of course be the preferable solution. --hardy

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Gunnar Morling
2013/9/4 Emmanuel Bernard > On Wed 2013-09-04 9:26, Gunnar Morling wrote: > > 2013/9/4 Emmanuel Bernard > > > > > On Wed 2013-09-04 8:27, Gunnar Morling wrote: > > > > 2013/9/3 Emmanuel Bernard > > > > > > > > > Something like c makes sense. > > > > > > > > > > > > > Ok. > > > > > > > > > > >

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Emmanuel Bernard
On Wed 2013-09-04 9:26, Gunnar Morling wrote: > 2013/9/4 Emmanuel Bernard > > > On Wed 2013-09-04 8:27, Gunnar Morling wrote: > > > 2013/9/3 Emmanuel Bernard > > > > > > > Something like c makes sense. > > > > > > > > > > Ok. > > > > > > > > > > It similar to the notion of converter in JPA. >

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Gunnar Morling
2013/9/4 Emmanuel Bernard > On Wed 2013-09-04 8:27, Gunnar Morling wrote: > > 2013/9/3 Emmanuel Bernard > > > > > Something like c makes sense. > > > > > > > Ok. > > > > > > > It similar to the notion of converter in JPA. > > > > > > But why not the following style of interfaces > > > > > >

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Gunnar Morling
2013/9/4 Gunnar Morling > (using correct list now) > > > 2013/9/3 Hardy Ferentschik > >> >> >> >> >> On 3 Sep 2013, at 15:58, Gunnar Morling wrote: >> >> > Hi, >> > >> > Yesterday George Gastaldi from the Forge team approached me regarding >> the >> > application of constraints to "wrapped" pro

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-04 Thread Emmanuel Bernard
On Wed 2013-09-04 8:27, Gunnar Morling wrote: > 2013/9/3 Emmanuel Bernard > > > Something like c makes sense. > > > > Ok. > > > > It similar to the notion of converter in JPA. > > > > But why not the following style of interfaces > > > > interface Convert { > > To convert(From); >

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-03 Thread Gunnar Morling
(using correct list now) 2013/9/3 Hardy Ferentschik > > > > > On 3 Sep 2013, at 15:58, Gunnar Morling wrote: > > > Hi, > > > > Yesterday George Gastaldi from the Forge team approached me regarding the > > application of constraints to "wrapped" properties. Their situation is > the > > followin

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-03 Thread Gunnar Morling
2013/9/3 Emmanuel Bernard > Something like c makes sense. > Ok. > It similar to the notion of converter in JPA. > > But why not the following style of interfaces > > interface Convert { > To convert(From); > } > Yes, thinking more about it, it probably makes sense to support m

Re: [hibernate-dev] [Validator] Applying constraints to property objects

2013-09-03 Thread Emmanuel Bernard
Something like c makes sense. It similar to the notion of converter in JPA. But why not the following style of interfaces interface Convert { To convert(From); } On Tue 2013-09-03 15:58, Gunnar Morling wrote: > Hi, > > Yesterday George Gastaldi from the Forge team approached me

[hibernate-dev] [Validator] Applying constraints to property objects

2013-09-03 Thread Gunnar Morling
Hi, Yesterday George Gastaldi from the Forge team approached me regarding the application of constraints to "wrapped" properties. Their situation is the following: ... @Size(min=3, max=10) UIInput name; ... Here, UInput is some kind of UI component, wrapping the actual property v