Dear Sarosh,
This will be the safest and easiest path to take. As on Hibernate website you will find how to migrate 3-4, 4-5, what api changed, renamed. As for Indexes or more for primary and unique keys.
I think this is out of box hibernate and java persistence api behavior where it scans all the classes search for specific annotaions and do nessesary action, when the app starts.
Please search for autodetection in hibernate. hibernate.archive.autodetection. I think at this is it. it has been a while I worked with hibernate.
Thanks,
Frank