Re: [hibernate-dev] Hibernate Validator next version

2009-01-29 Thread Hardy Ferentschik
I agree that option two is a no go. Personally, I would like to keep the  
whole product
range aligned in version number. Maybe we should go for 3.2 or 3.x for the  
greater good :)


--Hardy

On Tue, 27 Jan 2009 18:09:33 +0100, Emmanuel Bernard  
 wrote:


The next version of Hibernate Validator will be Bean Validation based  
and contain a bridge to support legacy Hibernate Validator.

I am wondering about the version number.

We have three approaches:
  - name it 4 but still  make it work with Hibernate 3 platform (waiting  
for the 4th coming)

  - name it 4 but not making it work for Hibernate 3
  - name it 3.2 and make it work with Hibernate 3 platform

option 2 is a no go as JPA2 will be Hibernate 3.x based more likely than  
4 based.
option 3 is a bit of a shame because HV is a massive improvement and API  
change
so that left option 1 but it means we break the "keep the same platform  
number paradigm"


I think we should go for option 1 nevertheless but wanted to ask.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev



___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Mark Hobson
I've written a small utility library that provides methods to work
with Types, specifically it contains such a method isAssignable(Type
supertype, Type type) that should satisfy your requirements.

I've been considering open-sourcing it so would be happy to do so if
you were interested?

Cheers,

Mark

2009/1/29 Emmanuel Bernard :
> Specifically a routine like
> boolean isSuperType(Type super, Type, sub);
> note Type, not Class
>
> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>
> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>
> Subtyping
>
> I am looking for an ASL 2 / BSD implementation of the subtyping resolution
> algorithm in Java.
>
> I am thinking Harmony might have one.
>
> Anybody knows?
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Emmanuel Bernard

If I can't find an other alternative that would surely be of help yes :)

Do you know how much of the subtype rules you have implemented?

The one that sounded non trivial to me were around detecting that  
generic are supertypes of others:

 - containment and equivalence
 - capture conversion
 - intersection types
 - management of bounds
(using the language of the JSL)


On  Jan 29, 2009, at 05:49, Mark Hobson wrote:


I've written a small utility library that provides methods to work
with Types, specifically it contains such a method isAssignable(Type
supertype, Type type) that should satisfy your requirements.

I've been considering open-sourcing it so would be happy to do so if
you were interested?

Cheers,

Mark

2009/1/29 Emmanuel Bernard :

Specifically a routine like
boolean isSuperType(Type super, Type, sub);
note Type, not Class

On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:

http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10

Subtyping

I am looking for an ASL 2 / BSD implementation of the subtyping  
resolution

algorithm in Java.

I am thinking Harmony might have one.

Anybody knows?

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev




___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Mark Hobson
I haven't gone into supporting type variables, hence I don't perform
type capturing or inference yet, although I would be interested in
adding this.  For an example of what is currently implemented, the
following are from the tests:

Number <: Integer
Object <: Integer
List <: List
Collection <: List
Collection <: ArrayList
List !<: Set
List !<: List
List <: List
List <: List
List <: List
List !<: List
List <: List
List <: List
List !<: List
List <: IntegerArrayList

Let me know if you find any existing libraries since I use this in my
other projects.  If there's nothing out there then open-sourcing this
would stop people from having to reinvent the wheel.

Cheers,

Mark

2009/1/29 Emmanuel Bernard :
> If I can't find an other alternative that would surely be of help yes :)
>
> Do you know how much of the subtype rules you have implemented?
>
> The one that sounded non trivial to me were around detecting that generic
> are supertypes of others:
>  - containment and equivalence
>  - capture conversion
>  - intersection types
>  - management of bounds
> (using the language of the JSL)
>
>
> On  Jan 29, 2009, at 05:49, Mark Hobson wrote:
>
>> I've written a small utility library that provides methods to work
>> with Types, specifically it contains such a method isAssignable(Type
>> supertype, Type type) that should satisfy your requirements.
>>
>> I've been considering open-sourcing it so would be happy to do so if
>> you were interested?
>>
>> Cheers,
>>
>> Mark
>>
>> 2009/1/29 Emmanuel Bernard :
>>>
>>> Specifically a routine like
>>> boolean isSuperType(Type super, Type, sub);
>>> note Type, not Class
>>>
>>> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>>>
>>>
>>> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>>>
>>> Subtyping
>>>
>>> I am looking for an ASL 2 / BSD implementation of the subtyping
>>> resolution
>>> algorithm in Java.
>>>
>>> I am thinking Harmony might have one.
>>>
>>> Anybody knows?
>>>
>>> ___
>>> hibernate-dev mailing list
>>> hibernate-dev@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>
>>>
>>> ___
>>> hibernate-dev mailing list
>>> hibernate-dev@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>
>>>
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] [Bean Validation] XML Mapping schema

2009-01-29 Thread Emmanuel Bernard
Latest refinements and batch of questions: 1  I gave up type subclassing, too much work and nobody seems excited 2 should we have  and  or should   be directly under  ? 3 should we have  or should  be under  directly? 4 should we allow 30 with the risk of people doing 30blahor should we mandate the use of value30  5 if some people could look at the xsd and propose improvement, that'd be great.I plan to introduce that in the spec tomorrow, so early feedback would be fantasticXML represents a sample and XSD is the schema generated from the XML file and adjusted.
http://jboss.org/xml/ns/javax/validation/mapping";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping mapping.xsd">
com.acme.dvdstore.model
 



  {error.tooSmall}
  
javax.validation.groups.Default
javax.validation.groups.NONDEFAULT
  
  2
  com.acme.MyClass
  
com.myenum.State.OK
com.myenum.State.NOK
  
  

  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  


  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  

  


  {error.tooSmall}
  
javax.validation.groups.Default
javax.validation.groups.NONDEFAULT
  
  2
  com.acme.MyClass
  
com.myenum.State.OK
com.myenum.State.NOK
  
  

  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  


  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  

  





  
  
  
  {error.tooSmall}
  
javax.validation.groups.Default
javax.validation.groups.NONDEFAULT
  
  2
  com.acme.MyClass
  
com.myenum.State.OK
com.myenum.State.NOK
  
  

  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  


  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  

  



  
  {error.tooSmall}
  
javax.validation.groups.Default
javax.validation.groups.NONDEFAULT
  





  
  
  
  {error.tooSmall}
  
javax.validation.groups.Default
javax.validation.groups.NONDEFAULT
  
  2
  com.acme.MyClass
  
com.myenum.State.OK
com.myenum.State.NOK
  
  

  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  


  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  

  



  
{error.tooSmall}

  javax.validation.groups.Default
  javax.validation.groups.NONDEFAULT

  
  




 



  2
  com.acme.MyClass
  
com.myenum.State.OK
com.myenum.State.NOK
  
  

  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  


  kindaregexp
  
com.myenum.State.OK
com.myenum.State.NOK
  

  





  
 

Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Emmanuel Bernard

Cool, that's already a nice start.
Let me see if I find something.

Would you be OK to contribute it under the ASL 2.0 license to us?

On  Jan 29, 2009, at 09:44, Mark Hobson wrote:


I haven't gone into supporting type variables, hence I don't perform
type capturing or inference yet, although I would be interested in
adding this.  For an example of what is currently implemented, the
following are from the tests:

Number <: Integer
Object <: Integer
List <: List
Collection <: List
Collection <: ArrayList
List !<: Set
List !<: List
List <: List
List <: List
List <: List
List !<: List
List <: List
List <: List
List !<: List
List <: IntegerArrayList

Let me know if you find any existing libraries since I use this in my
other projects.  If there's nothing out there then open-sourcing this
would stop people from having to reinvent the wheel.

Cheers,

Mark

2009/1/29 Emmanuel Bernard :
If I can't find an other alternative that would surely be of help  
yes :)


Do you know how much of the subtype rules you have implemented?

The one that sounded non trivial to me were around detecting that  
generic

are supertypes of others:
- containment and equivalence
- capture conversion
- intersection types
- management of bounds
(using the language of the JSL)


On  Jan 29, 2009, at 05:49, Mark Hobson wrote:


I've written a small utility library that provides methods to work
with Types, specifically it contains such a method isAssignable(Type
supertype, Type type) that should satisfy your requirements.

I've been considering open-sourcing it so would be happy to do so if
you were interested?

Cheers,

Mark

2009/1/29 Emmanuel Bernard :


Specifically a routine like
boolean isSuperType(Type super, Type, sub);
note Type, not Class

On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:


http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10

Subtyping

I am looking for an ASL 2 / BSD implementation of the subtyping
resolution
algorithm in Java.

I am thinking Harmony might have one.

Anybody knows?

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev







___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Emmanuel Bernard

ahem
excerpt from the Harmony code

package java.lang;

public final class Class implements Serializable, AnnotatedElement,
GenericDeclaration, Type {
[...]

public boolean isAssignableFrom(Class cls) {
return false;
 }
}

I don't think they have what I am looking for :)


On  Jan 30, 2009, at 00:12, Emmanuel Bernard wrote:


Cool, that's already a nice start.
Let me see if I find something.

Would you be OK to contribute it under the ASL 2.0 license to us?

On  Jan 29, 2009, at 09:44, Mark Hobson wrote:


I haven't gone into supporting type variables, hence I don't perform
type capturing or inference yet, although I would be interested in
adding this.  For an example of what is currently implemented, the
following are from the tests:

Number <: Integer
Object <: Integer
List <: List
Collection <: List
Collection <: ArrayList
List !<: Set
List !<: List
List <: List
List <: List
List <: List
List !<: List
List <: List
List <: List
List !<: List
List <: IntegerArrayList

Let me know if you find any existing libraries since I use this in my
other projects.  If there's nothing out there then open-sourcing this
would stop people from having to reinvent the wheel.

Cheers,

Mark

2009/1/29 Emmanuel Bernard :
If I can't find an other alternative that would surely be of help  
yes :)


Do you know how much of the subtype rules you have implemented?

The one that sounded non trivial to me were around detecting that  
generic

are supertypes of others:
- containment and equivalence
- capture conversion
- intersection types
- management of bounds
(using the language of the JSL)


On  Jan 29, 2009, at 05:49, Mark Hobson wrote:


I've written a small utility library that provides methods to work
with Types, specifically it contains such a method  
isAssignable(Type

supertype, Type type) that should satisfy your requirements.

I've been considering open-sourcing it so would be happy to do so  
if

you were interested?

Cheers,

Mark

2009/1/29 Emmanuel Bernard :


Specifically a routine like
boolean isSuperType(Type super, Type, sub);
note Type, not Class

On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:


http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10

Subtyping

I am looking for an ASL 2 / BSD implementation of the subtyping
resolution
algorithm in Java.

I am thinking Harmony might have one.

Anybody knows?

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev







___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev