public List findByRoleNameLike(String roleName) { Session session = HibernateTrain.getSession(); Criteria criteria = session.createCriteria(StaffRole.class).add(Restrictions.like("roleName", roleName)); return criteria.list(); }
public List findByCountryNameLike(String countryName) { Criteria criteria = session.createCriteria(Countries.class).add(Restrictions.like("countryName", countryName)); return criteria.list(); }