Query query = session.createQuery(
“select Vipdata from com.nscorp.hibernate.Vipdata Vipdata where vipName = :name order by Vipdata.vipName”);
query.setString(a_parameter);
return query.list();
It is expected that sometimes no result will be selected.
In the JSP, I try to get a column value from a row.
Assume only one row will be selected.
List vipList = VipService.getInstance().getVipdataList(‘AAA’);
String a = vipList.get(1).toString();
But the IndexOutOfBoundsException appears
How to get a column value from Hibernate List when the result contains data or not?
Thanks