2

I have a class with a nested list and I want to map this object into list of flat objects using ModelMapper.

public class A {
  private String str;
  private String str2;
  private List<B> blist;

  // Setters and getters
}

public class B {
  private String str3;
  private String str4;

  // Setters and getters
}

public class C {
  private String str;
  private String str2;
  private String str3;
  private String str4;

  // Setters and getters
}

I want to convert an object of class A into a list of objects of class C

LppEdd
  • 20,274
  • 11
  • 84
  • 139
Sara Selim
  • 409
  • 5
  • 21

0 Answers0