I don't see code that adds Students to the collection.
Code:
public ColleagePOJO createColleage(Long colleageID, String colleageName,
Long studentID, String studentName)
{
ColleagePOJO colleage = new ColleagePOJO();
try
{
colleage.setColleageID(colleageID);
colleage.setColleageName(colleageName);
HibernateUtil.create(colleage);
System.out.println("going to calling student-----");
createStudent(studentID, studentName, colleageID);
}
Should you be adding the student created into ColleagePOJO. You should have a helper method called "addStudent" that adds it to the Set. It may look something like this:
Student stud = createStudent(studentID, studentName, colleageID);
colleage.addStudent(stud);
Since you have given the "cascade" option as "all", Once you have persisted "Colleage" objects, you can add Students to the ColleagePOJO and simple called "save" and hibernate will insert rows to both the Parent (ColleagePOJO) and Student tables.