Fixed compiler warnings.
Code generation improvements.
APF-1430: Changed to use hibernate4-maven-plugin.