Eclipse "JPA Entities from Tables" how to map mysql datatypes to java datatypes? - jpa-2.0

I have eclipse kepler (really jbdev studio 7 alpha). The JPA Entities from Tables feature is amazing! Very sophisticated. Start it up with right-clicking on a project to which the JPA facet has been added. Then "New->JPA Entities from Tables" and follow the wizard.
There are lots of ways to customize the mapping of tables to entities, including lots of flexibility regarding relations between tables, but one thing I can not find is how to map database datatypes to java datatypes.
The result is that my entities were generated with many primitive datatypes and it's causing me problems.
How to do a "JPA Entities from Tables" and tell the generator to map MySQL "int" to Java "Integer" and not java "int"?
Big pain if I have to go in and edit these manually. :-( There are many attributes in many classes.

Related

Can I import doxygen tags in Enterprise Architect with reverse egineer in c++?

We're currently evaluating Enterprise Architect (12, release candidate).
The main reason we'd like to use it is to use the reverse engineering feature, from c++ to UML.
Our code base is documented using Doxygen tags.
Now, the parser of EA does not seem to recognize these tags. Is there a way I could enable it?
Edit:
The things I'm looking for are not to be inserted in the UML, but added to the model of the project. For instance, information defined by #param tags for methods are inserted in the "notes" of the methods and not in the "notes" of the parameters. The #author doxygen tags are not taken into consideration when generating the model, etc.
Some easy out-of-the-box customization of the parsers is probably not available.
I was solving similar problem of importing custom metadata (developer responsible for the class, corresponding database table or view mapping the entity, deployment package (.dll) and architecture layer, human-friendly class description, reference to specification documents etc.) contained elsewhere and making them available inside the Enterprise Architect in the form of informal notes and formal tagged values.
After some attempts to generate this metadata info as doxygen-style comments I gave up as the doxygen comment parser did not seem to be customizable and in order to make the non-ascii characters correctly imported the source code files had to contain the UTF-8 BOM preamble, which is not very 3rd party legacy tool-friendly encoding.
I have decided to go the way of generating XMI file with all the metadata placed inside the tags and documentation XML elements.
Before I resolved correct XMI encoding of composition and aggregation relationships the project was stopped at the phase when all the classes and attributes and associations and all the metamodel attributes (as notes and tagged values) were in there in under 600 lines of C# XMI-specific code and we had the few thousands of classes in EA available for analysts to work with.
In your case you may solve the need in a similar way:
import the C++ code base into Enterprise Architect using the reverse engineering
extract the doxygen comment metadata using some tool like doxygen's GENERATE_XML feature
export the Enterprise Architect model in a round-trip-friendly XMI format
write a single-purpose tool that will take the XMI model, your comment metadata and spit out new XMI model annotated with your proprietary information
import the XMI model back, done.
For steps 3...5 there may be an easier way as Enterprise Architect has the Scripting and Automation interface which allows to read/modify the model using languages like Visual Basic or C#

Bidirectional M2M Transformations using Eclipse EMF

I would like to do bidirectional Model2Model transformations. Both models are EMF / eCore based. Actually I would prefer that one model is an editable view on the other.
What are my options?
Which tools and tranformation languages are avaiable and what are their restrictions?
M2M are the hardest. Industries strength tools are rare, lots of academia stuff. If you're dead set on a M2M language, look into ATL which should also support ecore. Otherwise you can look at Xtend, which was made for model to text but you can abuse it and it should be more comftable than plain java. If your into research look at Scala based transformations here
http://metrikforge.informatik.hu-berlin.de/attachments/download/193/george_wider_scheidgen_ICMT_2012.pdf
There are more transformation tools than you can imagine for EMF, its kind of crazy...
For metamodel to metamodel transformation where the models are not very similar:
ATL is probably the most popular and most "baked"
Epsilon project has the Epsilon Transformation Language.
If the metamodels are very similar and you only need to tweak some things then there are tools targeted that type of migration/updating:
ATL now has a refining mode
Epsilon has Flock
Edapt looks very interesting as well because it does the metamodel/model changes together. It lets you work on a tree view and comes with a set prebuilt set of rules.
Henshin which lets you operate on a diagram view of the model
EMF Refactor is a more code-level approach, that can also use Henshin rules somehow.
You can always directly manipulate the metamodel and model using the EMF Java APIs as well.
I'll add, if you are doing any real EMF work you will need to get and read EMF: Eclipse Modeling Framework. It's available in Safari also. I highly recommend Safari, for $39 a month you get almost every development ebook you could ever use.
If you insist on doing bidirectional M2M transformations, (so-called Bxs), then know that there is an active researcher's community updating that wiki : http://bx-community.wikidot.com.
If you visit it, you will find that they list a bunch of tool suitable for Bx transformations http://bx-community.wikidot.com/relatedtools.
I used ECHO in the past which provides an implementation of QVT-R based on the KodKod constraints solver.
It's definitely worth giving it a try.
Since you specifically asked for bi-directional model transformations, I must say that you have no options. To make it claer, adding to the answer you got form Ed Willink, none of the existing M2M transformation languages (AFAIK) supports bi-directional model transformations.
Work on a QVTr and QVTc execution engine is starting to look promising if you are still interested in this: QVTd Project.

generic property panel

I need to evaluate the usage of django in implementing a back-office application. It should be able to do CRUD of about 150-200 different object types. As it's a back-office application it will contain a lot of grids/tables.
Many objects can have a bunch of associated properties. There are properties of the following types
simple text
one or several values chosen from a static list
one or several values chosen from a dynamic list with a possibility of search
custom types
These properties are defined in multiple languages.
This application should be highly customizable. All properties and the list of languages should be somehow defined in the model and then the application automatically creates a grid to show/edit them.
Currently we have a java application which displays them like that
Is django a good choice to implement this kind of application?
Do you know good references of django open-source back-office applications of similar type?
Will it be difficult to implement such dynamic property panels using django?

ColdFusion CRUD

For quite a long time now, I've been trying to write and have been in search of "a really good" CRUD application. Don't get me wrong - I didn't say "The ultimate" CRUD application. Just one that could be rated 1st class.
What I'm saying is: Please don't respond to this plea with an answer like "Well, every situation is different..."
Q: Is there a blog post or something in the Adobe documentation that shows CRUD on a one-to-many relationship (Header/Detail), that uses web standards css (instead of tables), that uses best practices (CF9 has changed so many things now: scripted components, ORM), that uses the latest UI techniques (jQuery or some of the built-in AJAX features of CF9), that has a nice front-end (a nice looking header and background along with some pretty buttons)?
I know that's a lot to ask, but such is my quest.
A good example of a one-to-many relationship is the city/state xml files built into the Spry examples. There are 23,000 cities in the sample xml files, so I think that's better than just using random data.
I'm not really sure what you're asking, but I just want to respond to a couple of points in your question (this is more a comment than an answer, but since SO is stupidly limited in this, I'll put it here instead.)
that uses web standards css (instead of tables),
There is no "css instead of tables" - they are two distinct and compatible things!
CSS describes visual aspects of a document, whilst tables markup tabular data.
If you're displaying tabular data, then tables is exactly what you should be using, and you can use CSS to make it look more exciting than the plain styles that tables come in.
Since you're asking for a CRUD app, odds are you are going to be wanting to display tabular data so should be using tables.
(The common mistake people make is not understanding the nature of the web, and using tables to apply grid layouts to documents, when they should be using strucuted semantic markup instead.)
that uses best practices (CF9 has changed so many things now:
scripted components, ORM)
Scripted components are not a best practise!
They are an alternative syntax (for people that prefer having non-descriptive braces everywhere) they do not offer anything you can't already do.
i would strongly suggest you check out cfwheels. read the documentation, it's built for doing such crud applications and has an amazing set of features and will save you a lot of time. as for the interface, there are many jquery plugins out there that can handle this. i suggest looking at ajaxrain and find a plugin you like

Looking for a customizable "flowchart builder " builder

I need to create a customized graphical flowchart builder. There are only three classes of connectable components, and two kinds of connectors from which the flowchart is constructed. Each component and connector class, though, needs to have a tailored set of properties associated with the instances of their class.
So I'm looking for a "flowchart builder" builder that lets me configure the types of components, the associated properties, and has all the plumbing already in place to handle drag/drop, resizing, drawing, connecting, load/save, and so on.
Ideally the resulting application would save diagrams in an XML-based format, but anything parsable would be fine.
Dia has the capabilities I'm looking for, however, customizing it for a new type of diagram requires coding up the specifics of the component set. I'm looking for something that on a much shorter timeframe constructs a flowchart application ideally based on the content of component and connector configuration definitions.
If you want to use Dia: It might not be necessary to "code" your components. Maybe you can simply "draw" them:
http://dia-installer.de/howto/create_shape/index.html.en
Such shapes can also be equipped with attributes (you'll have to do some XML-Editing for this):
http://git.gnome.org/browse/dia/tree/doc/custom-shapes#n260
I'm not sure if you were aware of this information.