-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yeah, thanks Matthias!

That works now...

I am really looking forward for the final release of AndroMDA 3.x ;)

MArtin

Matthias Bohlen wrote:
| Hi Martin,
|
| you work with AndroMDA 2.x, right? The problem in your
| getAttributesByStereotype() method is: the return value type is wrong.
| You have to return a collection of PAttribute, not of Attribute. This
| will help because in Attribute, there is no method called
| getTaggedValues(). velocity.log should have told you that.
|
| BTW, in AndroMDA 3.x, you will have to return AttributeFacade instead of
| PAttribute.
|
| Cheers...
| Matthias
|
|
|>-----Original Message-----
|>From: [EMAIL PROTECTED]
|>[mailto:[EMAIL PROTECTED] On Behalf
|>Of MArtin Schumacher
|>Sent: Wednesday, February 11, 2004 5:52 PM
|>To: [EMAIL PROTECTED]
|>Subject: [Andromda-user] method in SimpleOOHelper returns
|>"wrong" Attributes
|>
|>
|>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
|>
|
|
|
|
|


- -- Antworten bitte an: mailto:[EMAIL PROTECTED]

http://www.auchich.de

Mobil: 0170/4865431
Fax/Voicemail: 01212/51 42 16 437 (24Pf/Min)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAKptai+sOjl+XyEQRAqYfAJ92hLPYdi32RZEENH2tJiJ3rnQ6TwCeL4J7
wdxfZI0IEC05DXA6/AEG+ZU=
=Riu5
-----END PGP SIGNATURE-----


------------------------------------------------------- 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