I tried on Google for this keyword, and Google returns lots of links on how to implement this, one at the topmost is about writing a helping class called EnumUserType.
This solution is outdated as new versions of Hibernate 3 support JPA annotation @Enumerated. Using this former method is much simpler and therefore recommended.
Using @Enumerated annotation as below: Read more!