Hi everyone,

i changed the SimpleOOHelper and created a method
"getAttributesByStereotype" (see below @ [1]).  It gets an String (the
Stereotype) and a class-object.
Now i use it this way:
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----
#foreach ( $att in $transform.getAttributesByStereotype("PrimaryKey",
$source) )
#set ($dbcolumn = $transform.findTagValue($att.taggedValues, "db.column") )
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----
I can't read the TaggedValues of $att. :(

If I use
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----
#foreach ( $att in $source.attributes )
#set ($dbcolumn = $transform.findTagValue($att.taggedValues, "db.column") )
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----
it works fine...

Does anyone has a hint for me, why this can happen? Where do I loose my
TaggedValues?

Thx for your help,

MArtin

[1]
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----
public java.util.Collection getAttributesByStereotype(String stereotype,
Object object)
{
  java.util.ArrayList al = new java.util.ArrayList();
  for (Iterator it = getAttributes(object).iterator(); it.hasNext();)
  {
    Attribute a = (Attribute) it.next();
    // check if attribute is the PK of this class
    if (getStereotypeNames(a).contains(stereotype))
    {
      al.add(a);
    }
  }
  return al;
}
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----

-- 
have a look @ http://www.auchich.de




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to