HIbernate CRUD operations
 Below are some of the DB operations performed in Hibernate .    First we need to get the SessionFactory  object . We can get the object like this  SessionFactory factory= new AnnotationConfiguration().configure(hibernate.cfg.xml).buildSessionFactory();    1) Insert :  Session session=factory.openSession();  Employee emp=new Employee("empID","empName");  session.save(emp);   2) Delete:  Session session=factory.openSession();  Employee emp=session.createCriteria(Employee.class).add(Restrictions.eq("empID","123")).uniqueResult();  session.delete(emp);   3) Update:  Criteria criteria = session.createCriteria(Employee.class).add(Restrictionss.eq("id", 1));  Employee emp = (Employee) criteria.uniqueResult();  emp.setSalary(5000);  session.update(emp);   4) Select:  Session session=factory.openSession();  List empList=session.createCriteria(Employee.class).add(Restrictions.eq("company","Google")).list(); // Will get the li...