Author Topic: Revert tables into classes  (Read 3045 times)

ZoranPavlovic

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Revert tables into classes
« on: October 11, 2012, 09:56:09 pm »
Hi 2 All,

I don't know is it possible:

doing reverse engineering, I made tables, and now have to go back to create classes. The problem is, that some of the tables have 20-30 fields, and it is really touhg job, copy - paste fields (not all, but still much) into classes.

is there any automation, that I can revert Table object, into a class ?

thanks in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Revert tables into classes
« Reply #1 on: October 11, 2012, 10:25:10 pm »
You can drag attributes (your fields in your tables) from the project browser onto your class on a diagram.
That will create a copy of that attribute in the class.

And since the project browser supports multi-select, that is probably the fastest way to do that if your classes already exist.

Otherwise you can create a copy of the whole table using copy element(s)/paste element(s) in the project browser.

Geert

ZoranPavlovic

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Revert tables into classes
« Reply #2 on: October 11, 2012, 10:53:17 pm »
Excellent ! ..many thanks Geert.

the only problem is, that any attribut ,which I drag-drop from table into a class is public (+) but should be private (-)

anyhow .. it is not so big problem as copy-paste hundred of fields I did up to now.

regards and thanks once again

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: Revert tables into classes
« Reply #3 on: October 13, 2012, 07:34:02 pm »
Also take a look at the Sparx Logical and Conceptual MDA Transforms on the community website:, specifically The Physical to Logical transform.

http://community.sparxsystems.com/resources/code-templates/data-modeling-logical-and-conceptual-mda-transforms