replace the deprecated hibernate method
Merge branch 'master' into xiaodong
replace deprecated hibernate method.

I do not change the version because this is not critical change.
Merge pull request #11 from ebf/xiaodong

Xiaodong