Get Record from Database Behalf on Id through Hibernate.
Session session= getSession();
Transaction t = session.beginTransaction();
Query q= session.createQuery("from Employee e where e.id='"+id+"'");
List<Employee> list= q.list();
t.commit();
closeSession();
return list;
Transaction t = session.beginTransaction();
Query q= session.createQuery("from Employee e where e.id='"+id+"'");
List<Employee> list= q.list();
t.commit();
closeSession();
return list;