/** * Creates an "equals" Criterion based on the specified property name and value. * * @param propertyName The property name * @param propertyValue The property value * @return A Criterion instance */ public Criteria eq(String propertyName, Object propertyValue) { validatePropertyName(propertyName, "eq"); addToCriteria(Restrictions.eq(propertyName, propertyValue)); return this; }
@Override public Query.Criterion createCriterion() { return Restrictions.eq(propertyName, arguments[0]); }