select u from userentity u
...
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<userentity > q = cb.createQuery(userentity .class);
Root<userentity > c = q.from(userentity .class);
ParameterExpression<Integer> p = cb.parameter(Integer.class);
q.select(c).where(cb.gt(c.get("id"), p));
...
<property name="hibernate.hbm2ddl.auto">none</property>
<option name="title">${role.title}</option>