Example usage for org.hibernate.criterion MatchMode toMatchString

List of usage examples for org.hibernate.criterion MatchMode toMatchString

Introduction

In this page you can find the example usage for org.hibernate.criterion MatchMode toMatchString.

Prototype

public abstract String toMatchString(String pattern);

Source Link

Document

Convert the pattern, by appending/prepending "%"

Usage

From source file:grails.orm.RlikeExpression.java

License:Apache License

public RlikeExpression(String propertyName, String value, MatchMode matchMode) {
    this(propertyName, matchMode.toMatchString(value));
}

From source file:org.eulerframework.web.core.extend.hibernate5.RestrictionsX.java

License:Apache License

public static LikeExpressionX like(String propertyName, String value, MatchMode matchMode) {
    return new LikeExpressionX(propertyName, matchMode.toMatchString(replaceSpecialChar(value)), ESCAPE_CHAR);
}