/** * Creates an rlike 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 rlike(String propertyName, Object propertyValue) { validatePropertyName(propertyName, "like"); Assert.notNull(propertyValue, "Cannot use like expression with null value"); addToCriteria(Restrictions.rlike(propertyName, propertyValue.toString())); return this; }
@Override public Query.Criterion createCriterion() { return Restrictions.rlike(propertyName, arguments[0].toString()); }