public List regionsByExample(Countries countries) { Criteria cri = session.createCriteria(Countries.class); Example exam = Example.create(countries); cri.add(exam); return cri.list(); }
public List byExample(StaffRole staffRole) { Session session = HibernateTrain.getSession(); Criteria cri = session.createCriteria(StaffRole.class); Example exam = Example.create(staffRole); cri.add(exam); return cri.list(); }