Book a Demo

Author Topic: read overridden attribute initializer  (Read 2876 times)

Juergen Weber

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
read overridden attribute initializer
« on: October 29, 2010, 03:52:22 am »
Hi,

how can you get the value of an overridden attribute initializer with eaapi.jar?
Or do you need SQL? Is there a sample for using SQL from Java?

Thanks very much,
Juergen

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: read overridden attribute initializer
« Reply #1 on: October 29, 2010, 05:24:13 pm »
Attribute.Default should give you the default value for an attribute.
To figure out which attributes are overridden, that is going to be a bit more difficult.
You'll have to find the superclass(es) and compare their attribute names with the one you have.
If it's the same then the attribute is overridden.
If then the default value is different the initializer is overridden.

If you are specifically looking for a list of attributes with an overridden default you better use some fancy sql query to find those (because looping over every attribute in the model is going to take a looooong time.)

Geert