You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Håkon Sagehaug <Ha...@bccs.uib.no> on 2009/01/23 08:42:28 UTC
Annotate an attribute to follow a pattern
Hi
Is it possible in openjpa to annotate a attribute to conform to a patters
say en email pattern?
cheers, Håkon
--
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)
Re: Annotate an attribute to follow a pattern
Posted by Pinaki Poddar <pp...@apache.org>.
http://jcp.org/aboutJava/communityprocess/edr/jsr303/index.html
Daryl Stultz wrote:
>
> On Mon, Jan 26, 2009 at 1:59 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
>>
>> Hi,
>> JPA 2.0 Expert Group is discussing the possibility of integrating
>> Validation framework.
>>
>
> "A" validation framework, or one in particular?
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
>
>
--
View this message in context: http://n2.nabble.com/Annotate-an-attribute-to-follow-a-pattern-tp2202089p2219934.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Annotate an attribute to follow a pattern
Posted by Daryl Stultz <da...@6degrees.com>.
On Mon, Jan 26, 2009 at 1:59 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
> Hi,
> JPA 2.0 Expert Group is discussing the possibility of integrating
> Validation framework.
>
"A" validation framework, or one in particular?
--
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com
Re: Annotate an attribute to follow a pattern
Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
JPA 2.0 Expert Group is discussing the possibility of integrating
Validation framework.
Miłosz Tylenda wrote:
>
> Håkon,
>
> Another option is to have a look at some validation framework. There are a
> couple of them, here is a list:
>
> http://java-source.net/open-source/validation
>
> Cheers,
> Milosz
>
>> Hi,
>>
>> I don't think that capability currently exists. I'm assuming you'd want
>> OpenJPA to validate the attribute before the entity is flushed and then
>> throw a UserException?
>>
>> It's an interesting enhancement, but at the moment I think you'll have to
>> do
>> the validation manually (say in the set method for the attribute).
>>
>> -mike
>>
>> On Fri, Jan 23, 2009 at 1:42 AM, Håkon Sagehaug
>> wrote:
>>
>> > Hi
>> >
>> > Is it possible in openjpa to annotate a attribute to conform to a
>> patters
>> > say en email pattern?
>> >
>> > cheers, Håkon
>> >
>> > --
>> > Håkon Sagehaug, Software Developer
>> > Parallab, Bergen Center for Computational Science (BCCS)
>> > UNIFOB AS (University of Bergen Research Company)
>> >
>>
>
>
--
View this message in context: http://n2.nabble.com/Annotate-an-attribute-to-follow-a-pattern-tp2202089p2219864.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Annotate an attribute to follow a pattern
Posted by Miłosz Tylenda <mt...@o2.pl>.
Håkon,
Another option is to have a look at some validation framework. There are a couple of them, here is a list:
http://java-source.net/open-source/validation
Cheers,
Milosz
> Hi,
>
> I don't think that capability currently exists. I'm assuming you'd want
> OpenJPA to validate the attribute before the entity is flushed and then
> throw a UserException?
>
> It's an interesting enhancement, but at the moment I think you'll have to do
> the validation manually (say in the set method for the attribute).
>
> -mike
>
> On Fri, Jan 23, 2009 at 1:42 AM, Håkon Sagehaug
> wrote:
>
> > Hi
> >
> > Is it possible in openjpa to annotate a attribute to conform to a patters
> > say en email pattern?
> >
> > cheers, Håkon
> >
> > --
> > Håkon Sagehaug, Software Developer
> > Parallab, Bergen Center for Computational Science (BCCS)
> > UNIFOB AS (University of Bergen Research Company)
> >
>
Re: Annotate an attribute to follow a pattern
Posted by Michael Dick <mi...@gmail.com>.
Hi,
I don't think that capability currently exists. I'm assuming you'd want
OpenJPA to validate the attribute before the entity is flushed and then
throw a UserException?
It's an interesting enhancement, but at the moment I think you'll have to do
the validation manually (say in the set method for the attribute).
-mike
On Fri, Jan 23, 2009 at 1:42 AM, Håkon Sagehaug
<Ha...@bccs.uib.no>wrote:
> Hi
>
> Is it possible in openjpa to annotate a attribute to conform to a patters
> say en email pattern?
>
> cheers, Håkon
>
> --
> Håkon Sagehaug, Software Developer
> Parallab, Bergen Center for Computational Science (BCCS)
> UNIFOB AS (University of Bergen Research Company)
>