0

If I have Collection object class member like ArrayList<ArrayList<Employee>> in some xyz Class, how to marshall this xyz Class object ?

Analogous with 2D, 3D arrays.

Does annox (https://github.com/highsource/annox) support it?

Is it mandatory to have a wrapper class like EmployeeList which will have a member variable as List<Employee> and a wrapper above it like ListOfEmployeeList which will have a member variable as List<EmployeeList>?

Or is it related or equivalent to anyElement of XML.

Mandar Autade
  • 336
  • 2
  • 12
  • What does [tag:annox] has to do with this? – lexicore Dec 26 '19 at 16:47
  • I still fail to understand how [tag:annox] is relevant here. – lexicore Dec 26 '19 at 17:02
  • @lexicore if we forget about annox for a while, whats your suggestion for this kind of scenario ? – Mandar Autade Dec 26 '19 at 17:04
  • As always - first write an XSD which adequately expresses your data structure and then generate your Java code. You might end up with wrapper classes, but I personally don't see big disadvantages of those. – lexicore Dec 26 '19 at 17:06
  • @lexicore is there any way without wrapper classes for these kind of data structures ? Because I generate these xsd and annox binding files at runtime wherein the plain java class is the input.(plain as in, not using jaxb framework annotations because am using annox https://github.com/highsource/annox) Please can you share some insight in both JAXB FRAMEWORK SCENARIO and ANNOX SCENARIO – Mandar Autade Dec 26 '19 at 17:18
  • Because the creator of the Java class doesn't know that these kind of data structures aren't supported(Or I am not aware of handling it in a better way rather than using wrapper classes for such data structures) – Mandar Autade Dec 26 '19 at 17:20
  • Wrapper classes are the way to go here. I don't think you can really do it differently. – lexicore Dec 26 '19 at 17:21

0 Answers0