Reconstructed the JPA code, including the Entity Beans.

The entity beans has add Named Query, get from netbean's JPA generating
function.
Also change some conflict attribute such as contests in User.

While changing the code, I also found the version column of hibernate
was not set in some tables, so I change the database design as well. Of
course, the @Version is also put into use.

Early this day, I also write a DAO based on hibernate core API, but ugly
done as the SessionFactory was not setup. (I configure the context.xml
base on JPA originally.) But I don't think this DAO is good to use, just
for my practice.

Further work maybe setting up the DAOs, or if necessary, set up some
ETOs or DTOs. 

Signed-off-by: Winguse <github@winguse.com>