Criteria c = session.createCriteria(klazz); c.add(Expression.ilike("name",name,MatchMode.ANYWHERE)); return c.uniqueResult();
Criteria c = session.createCriteria(example.getClass()); c.add(Example.create(example)); return c.list();
            public Object doInHibernate(Session session)                    throws HibernateException {                Criteria c = session.createCriteria(klazz);                c.add(Expression.ilike("name",name,MatchMode.ANYWHERE));                return c.uniqueResult();                            }