Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » OCL with java date attributes?
OCL with java date attributes? [message #651360] Sat, 29 January 2011 21:48 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi,
Is there anyway to use eclipse annotated inline OCL to validate an eDate attribute ? moreless like we can do using JPA annotations?


cheers

Cristiano

[Updated on: Sat, 29 January 2011 22:06]

Report message to a moderator

Re: OCL with java date attributes? [message #651373 is a reply to message #651360] Sun, 30 January 2011 00:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30553
Registered: July 2009
Senior Member
Cristiano,

I'm not sure what type of specialized date support OCL provides. There
is support OCL annotations to express constraints.


Cristiano Gaviao wrote:
> Hi,
> Is there any way to using eclipse annotated class inline OCL to
> validate an eDate attribute ? moreless like we can do using JPA
> annotations?
>
> cheers
>
> Cristiano
Re: OCL with java date attributes? [message #651886 is a reply to message #651373] Tue, 01 February 2011 21:43 Go to previous messageGo to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Well Ed, let me try to be more specific.

I have a Eclass Job. It has 2 attributes of type eDate.

I want constraint those attributes, so only data.year > 1990 is allowed.

And I want to use ocl console to select Jobs between two passed dates.

Could I do this ?

Thanks a lot

Cristiano
Re: OCL with java date attributes? [message #651986 is a reply to message #651886] Wed, 02 February 2011 10:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30553
Registered: July 2009
Senior Member
Cristiano,

Comments below.

Cristiano Gaviao wrote:
> Well Ed, let me try to be more specific.
>
> I have a Eclass Job. It has 2 attributes of type eDate.
>
> I want constraint those attributes, so only data.year > 1990 is allowed.
As I said, I'm not sure what type of support OCL has for dates.
Certainly you could use extended meta data (XML Schema-based)
constraints for this.
>
> And I want to use ocl console to select Jobs between two passed dates.
I don't know much about the OCL console. Maybe it's good to ask about
all this on the OCL newsgroup.
>
> Could I do this ?
>
> Thanks a lot
>
> Cristiano
>
Previous Topic:JETEmitter failing to build with Custom Templates
Next Topic:Limiting access to an EMF model
Goto Forum:
  


Current Time: Mon Oct 21 23:01:43 GMT 2019

Powered by FUDForum. Page generated in 0.02070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top