generate code for hibernate