public static class SqlOperator.SqlOperatorLike extends SqlOperator.SqlOperatorString
SqlOperator
for SQL like match operation on String
.SqlOperator.SqlOperatorBetween<N extends Number>, SqlOperator.SqlOperatorContainment, SqlOperator.SqlOperatorEmptyness, SqlOperator.SqlOperatorLike, SqlOperator.SqlOperatorNumber, SqlOperator.SqlOperatorString
Modifier and Type | Field and Description |
---|---|
private char |
escape |
private static char |
NO_ESCAPE |
static String |
SQL_LIKE
"LIKE"
|
static String |
SQL_NOT_LIKE
"NOT LIKE"
|
private static char |
WILDCARD_ANY |
private static char |
WILDCARD_SINGLE |
BETWEEN, EMPTY, EQUAL, GREATER_OR_EQUAL, GREATER_THAN, IN, LESS_OR_EQUAL, LESS_THAN, LIKE, NOT_BETWEEN, NOT_EMPTY, NOT_EQUAL, NOT_IN, NOT_LIKE
Constructor and Description |
---|
SqlOperatorLike(boolean positive)
The constructor.
|
SqlOperatorLike(boolean positive,
char escape)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(String arg1,
String arg2)
This method evaluates this
SqlOperator for the given arguments. |
char |
getEscape() |
private boolean |
isPositive() |
SqlOperator<String,String> |
negate() |
getSql, getType, toString
private static final char WILDCARD_SINGLE
private static final char WILDCARD_ANY
public static final String SQL_LIKE
public static final String SQL_NOT_LIKE
private static final char NO_ESCAPE
private final char escape
public SqlOperatorLike(boolean positive)
positive
- - true
for SQL_LIKE
, false
for SQL_NOT_LIKE
.public SqlOperatorLike(boolean positive, char escape)
positive
- - true
for SQL_LIKE
, false
for SQL_NOT_LIKE
.escape
- - see getEscape()
.public char getEscape()
private boolean isPositive()
public boolean evaluate(String arg1, String arg2)
SqlOperator
SqlOperator
for the given arguments.evaluate
in class SqlOperator<String,String>
arg1
- is the first argument.arg2
- is the second argument.SqlOperator
applied to the given arguments.public SqlOperator<String,String> negate()
negate
in class SqlOperator<String,String>
CompareOperator
that evaluates
to the
negated result.Copyright © 2001–2016 mmm-Team. All rights reserved.