Recursive Lists in Business Objects
Posted: Mon May 17, 2021 8:54 am
Hi. I have 2 classes like this:
class Location {
String Name;
List<Location> Children;
List<Equipment> Stuff;
}
class Equipment {
String Name;
List<Equipment> Children;
}
I'd like to see something like this in a Report:
Location A
Equipment A-1
Location A-A
Equipment A-A-1
Equipment A-A-2
Equipment A-A-2-1
Location A-B
Location B
There should be no limit on the depth of the recursion.
How should I build a report like this?
TIA
Martin
class Location {
String Name;
List<Location> Children;
List<Equipment> Stuff;
}
class Equipment {
String Name;
List<Equipment> Children;
}
I'd like to see something like this in a Report:
Location A
Equipment A-1
Location A-A
Equipment A-A-1
Equipment A-A-2
Equipment A-A-2-1
Location A-B
Location B
There should be no limit on the depth of the recursion.
How should I build a report like this?
TIA
Martin