It is common practice to convert your generated JAXB objects to correctly defined domain model classes. This way, you have full control over how model classes behave in your code, and if XSD changes you don't get a lot of space in your code that breaks. You only need to update your converter class, as this should be the only place you rely on the generated JAXB classes.
source share