Hibernate has example criteria: For example:
Example equal = Example.create(mydbObject);
Is there a way to do the opposite, For example:
I looking for the same restriction method for "not equal" and according to the document, it's
List list = getSession().createCriteria("you.pakcage.hibernate.Example")
.add(Restrictions.ne("myProperty","blablabla"))
.list();
by this way you retreat a list contain all the Example object except those whose myProperty property is "blablabla".
May be not exactly what you what, but it achieve the same thing for me .