Book a Demo

Author Topic: MDA converts Map to List  (Read 3668 times)

Jakub

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
MDA converts Map to List
« on: September 16, 2013, 08:56:50 pm »
Hi,
sorry I am new to MDG converting PIM to Java PSM using default java transformation.  In my PIM I have specified Maps - source role has qualifiers specified. When I generete code directly from there I get correct Maps interfaces. However when I do transformation to Java PSM and generates code from there I get nonsense:
Code: [Select]
public class Check {

private List< Comp> comps;
private List< Gratuity> gratuities;

public Check(){

}

public Map<String, Comp> getcomps(){
    return comps;
}

public Map<String, Gratuity> getgratuities(){
    return gratuities;
}

Field is List but setters and getters return Maps. I would like to get it fixed - as I think that during transformation qualifier in source role is ereased but I wasn't able to fix it. (Using java default transformation)
Can anyone help or give me a clue?
Thx
« Last Edit: September 16, 2013, 09:13:38 pm by jaksky »

lara winson

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: MDA converts Map to List
« Reply #1 on: September 20, 2013, 04:54:52 pm »
Map contain two object key as list has only one object key. Handling is the main issue.I have used this link to convert the Map to list you can refer the code and get the idea.

Jakub

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: MDA converts Map to List
« Reply #2 on: September 22, 2013, 03:24:36 am »
Quote
Map contain two object key as list has only one object key. Handling is the main issue.I have used this link to convert the Map to list you can refer the code and get the idea.
I don't want to convert map to list - the problem is that I want to keep the qualification from PIM to PSM but I cannot make it work! Customizing default transformation templates with no success.