@SuppressWarnings("unchecked")
public List<Academic> ProfileAcademicListByUserId(String user_id) {
s = sf.openSession();
Transaction t = s.beginTransaction();
List<Academic> academiclist = null;
try {
academiclist = s.createQuery("from Academic where user_id='" + user_id + "'").list();
} catch (HibernateException HE) {
System.out.println(HE);
}
t.commit();
s.close();
sf.close();
return academiclist;
}
public List<Academic> ProfileAcademicListByUserId(String user_id) {
s = sf.openSession();
Transaction t = s.beginTransaction();
List<Academic> academiclist = null;
try {
academiclist = s.createQuery("from Academic where user_id='" + user_id + "'").list();
} catch (HibernateException HE) {
System.out.println(HE);
}
t.commit();
s.close();
sf.close();
return academiclist;
}
No comments:
Post a Comment