Have al look at the eclipse modeling framework.
The advantage is that you can generate from a model and not (only) from a database. You can define your own uml profile to set properties for the...