Soft-Pro Solutions
public List getRejectedStatusList(CallLetterDetails callLetterDetails) { List lstReturn = new ArrayList(); try { Session sessionFactory = HibernateUtil.currentSession(); Transaction tx = sessionFactory.beginTransaction(); Criteria crit = sessionFactory .createCriteria(CallLetterDetails.class); tx.commit(); crit.add(Restrictions.eq("id", callLetterDetails.getId())); crit.add(Restrictions.disjunction() .add(Restrictions.eq("osstatus", 'N')) .add(Restrictions.eq("pastatus", 'N')) .add(Restrictions.eq("aostatus", 'N')) .add(Restrictions.eq("registrarstatus", 'N')) .add(Restrictions.eq("ceostatus", 'N')) .add(Restrictions.eq("directorstatus", 'N')));
lstReturn = crit.list(); System.out.println("------------ List Size : " + lstReturn.size()); } catch (Exception e) { // TODO: handle exception } return lstReturn; }
}
-----use disjunction in ur code
Last edited by dvswapnil on Fri Oct 25, 2013 3:31 am, edited 2 times in total.
|