Monthly Archives: September 2011

Hibernate – Inheritance Mapping

Suppose that there are three classes called Project, Module and Task. Module class extends Project class. Task class extends Module class. UML class diagram of this multilevel inheritance application is shown below. There are three types of strategies for inheritance … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Hibernate – Many to Many Mapping

In this example I will show how to map many-to-many relationship using Annotations.Consider the following relationship between Student and Course entity. According to the relationship a student can enroll in any number of courses and the course can have any … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Java HashMap Example

Note that HashMap makes absolutely no guarantees about the iteration order. It can (and will) even change completely when new elements are added. If you do find yourself having to iterate through a HashMap, remember this little caveat: “This class … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment