Revert "Modify hibernate classes."

This reverts commit 55c600929d31a9c4739220e17e1e3d35e0752830.