permaculture playing cards*
The moose likes Blog around the Campfire and the fly likes Simple Hibernate Example with Enums Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Other » Blog around the Campfire
Bookmark "Simple Hibernate Example with Enums" Watch "Simple Hibernate Example with Enums" New topic
Author

Simple Hibernate Example with Enums

Christopher Rygaard
Ranch Hand

Joined: Feb 22, 2014
Posts: 42
    
    3
Simple Enum Example

This is the simplest stand-alone Hibernate Enum example I could cook up.

The interesting part is the annotation on MyPersistentObject._myEnum. Also notice that I don't need to register the Enum with Hibernate (eg. call addAnnotatedClass(...)).

Notice: This is provided with no warranty whatsoever. Use at your own risk.

This is the Enum:

This is the class that has an instance of the Enum:

This is how I use it:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Hibernate Example with Enums
 
Similar Threads
Simple Hibernate Container Example
Simple Hibernate Lazy Loading Example
Simple Hibernate Example with Final Classes and Final Methods
Simple Hibernate Cascade Save Example
Simple Hibernate POJO example