Exemplo n.º 1
0
  public List findByRoleNameLike(String roleName) {

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

    Criteria criteria =
        session.createCriteria(Countries.class).add(Restrictions.like("countryName", countryName));
    return criteria.list();
  }