Hibernate has example criteria: For example:
Example equal = Example.create(mydbObject);
Is there a way to do the opposite, For example:
Use it with s.createCriteria(YourClass.class).add(Restrictions.not(notEqual));.
s.createCriteria(YourClass.class).add(Restrictions.not(notEqual));