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 #594714] Tue, 24 October 2006 11:15
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
Previous Topic:Embedded lists in xml schema
Next Topic:Embedded lists in xml schema
Goto Forum:
  


Current Time: Fri Mar 29 06:34:29 GMT 2024

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

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

Back to the top