Easy. To use a distribution like Template-Toolkit to generate correct Java code after abstracting away that boring business model. Not that all business models are boring, just the ones I found enough for that commercial application. Once you made the template right, you don't need to battle the compiler anymore. Just make sure you didn't make any mistakes writing the metadata in XML or YAML.