We have a parent type, lets say name of business sectors(eg Aviation,Defense) , based on sector we have dynamic forms that ask for sector specific data and on submit we need to store that data in table of Aviation(since user selected Aviation), also table of aviation has different fields than that of Defense or Biotechnology.
We are looking to leverage design principles and reflection in java to avoid boiler-plate code and make it as dynamic as possible
Also we use hibernate, thus we need to dynamically end-up with a valueObject VO such that we can just call
session.save(dynamicSectorVO);
Also just to give an idea about the scale of possible boiler-plate we have 26 such parent types(sectors here).
Any ideas that could help are appreciated.