Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Support EMF custom EDataTypes
Support EMF custom EDataTypes [message #59034] Tue, 24 October 2006 11:15 Go to next message
Michael Kanaley is currently offline Michael KanaleyFriend
Messages: 89
Registered: July 2009
Member
Hi Martin,
We would like to be able to support properties (both singleton and
collection) of EDataTypes that we define.
An EMF custom data type is used to provide the clients of an EMF model with
a Java class restricting the format of an underlying String that is
persisted.

A straightforward custom data type is VersionNumber used to model the
version of an Eclipse plugin. The Java class accepts integer major, minor,
patch versions along with a qualifier String. It prevents clients of the EMF
model to try to persist a character in the major, minor and patch segments
of the version number. In XMI it is serialized as a String of the form
major.minor.patch.qualifier. In the database, it is persisted the same way
in a VARCHAR column.

Note that EMF custom data types could be modeled just like any other object.
However, serialization would be to a different table with its own columns
related by foreign key to the "owning" object. This does not perform as well
as simply serializing the custom data type into the VARCHAR column of the
"owning" object.
For more info about custom EMF data types see the "Data types" section of
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index .jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.html If
you are interested in having Teneo support this functionality out-of-the-box
then I can file a bugzilla and provide a patch that works with Hibernate
using typedefs.The patch would also work for the cases below (given that
they implement createFromString and convertToString as described in the link
above):Hans Mueller-Dieckert hmd@arcsolutions.de - Teneo: Hibernate and
Arrays as EDataTypeChris Hines ChrisHines@msn.com - Teneo: storing custom
EDataType attributes (i.e. java.io.File)Thanks,-mike
Re: Support EMF custom EDataTypes [message #59287 is a reply to message #59034] Wed, 25 October 2006 15:12 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mike,
Thanks, contributions are wellcomed ofcourse.

Does your approach involve adding support for the hibernate TypeDef(s) annotations?

gr. Martin

Michael Kanaley wrote:
> Hi Martin,
> We would like to be able to support properties (both singleton and
> collection) of EDataTypes that we define.
> An EMF custom data type is used to provide the clients of an EMF model with
> a Java class restricting the format of an underlying String that is
> persisted.
>
> A straightforward custom data type is VersionNumber used to model the
> version of an Eclipse plugin. The Java class accepts integer major, minor,
> patch versions along with a qualifier String. It prevents clients of the EMF
> model to try to persist a character in the major, minor and patch segments
> of the version number. In XMI it is serialized as a String of the form
> major.minor.patch.qualifier. In the database, it is persisted the same way
> in a VARCHAR column.
>
> Note that EMF custom data types could be modeled just like any other object.
> However, serialization would be to a different table with its own columns
> related by foreign key to the "owning" object. This does not perform as well
> as simply serializing the custom data type into the VARCHAR column of the
> "owning" object.
> For more info about custom EMF data types see the "Data types" section of
> http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index .jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.html If
> you are interested in having Teneo support this functionality out-of-the-box
> then I can file a bugzilla and provide a patch that works with Hibernate
> using typedefs.The patch would also work for the cases below (given that
> they implement createFromString and convertToString as described in the link
> above):Hans Mueller-Dieckert hmd@arcsolutions.de - Teneo: Hibernate and
> Arrays as EDataTypeChris Hines ChrisHines@msn.com - Teneo: storing custom
> EDataType attributes (i.e. java.io.File)Thanks,-mike
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Support EMF custom EDataTypes [message #594817 is a reply to message #59034] Wed, 25 October 2006 15:12 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mike,
Thanks, contributions are wellcomed ofcourse.

Does your approach involve adding support for the hibernate TypeDef(s) annotations?

gr. Martin

Michael Kanaley wrote:
> Hi Martin,
> We would like to be able to support properties (both singleton and
> collection) of EDataTypes that we define.
> An EMF custom data type is used to provide the clients of an EMF model with
> a Java class restricting the format of an underlying String that is
> persisted.
>
> A straightforward custom data type is VersionNumber used to model the
> version of an Eclipse plugin. The Java class accepts integer major, minor,
> patch versions along with a qualifier String. It prevents clients of the EMF
> model to try to persist a character in the major, minor and patch segments
> of the version number. In XMI it is serialized as a String of the form
> major.minor.patch.qualifier. In the database, it is persisted the same way
> in a VARCHAR column.
>
> Note that EMF custom data types could be modeled just like any other object.
> However, serialization would be to a different table with its own columns
> related by foreign key to the "owning" object. This does not perform as well
> as simply serializing the custom data type into the VARCHAR column of the
> "owning" object.
> For more info about custom EMF data types see the "Data types" section of
> http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index .jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.html If
> you are interested in having Teneo support this functionality out-of-the-box
> then I can file a bugzilla and provide a patch that works with Hibernate
> using typedefs.The patch would also work for the cases below (given that
> they implement createFromString and convertToString as described in the link
> above):Hans Mueller-Dieckert hmd@arcsolutions.de - Teneo: Hibernate and
> Arrays as EDataTypeChris Hines ChrisHines@msn.com - Teneo: storing custom
> EDataType attributes (i.e. java.io.File)Thanks,-mike
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:ArrayIndexOutOfBoundsException when generating EMF-JDO/JPOX OR mapping
Next Topic:[teneo] Exception when using Enums
Goto Forum:
  


Current Time: Tue Sep 24 19:39:29 GMT 2024

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

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

Back to the top