public class MatchCriteria extends PredicateCriteria implements PredicateCriteria.Negatable
Modifier and Type | Class and Description |
---|---|
static class |
MatchCriteria.PatternTranslator
Utility to convert the pattern into a different match syntax
|
PredicateCriteria.Negatable
LanguageObject.Util
Modifier and Type | Field and Description |
---|---|
static char |
MATCH_CHAR
The default single match character - '_'
|
static char |
NULL_ESCAPE_CHAR
The internal null escape character
|
static char |
WILDCARD_CHAR
The default wildcard character - '%'
|
Constructor and Description |
---|
MatchCriteria()
Constructs a default instance of this class.
|
MatchCriteria(Expression leftExpression,
Expression rightExpression)
Constructs an instance of this class from a left and right expression
|
MatchCriteria(Expression leftExpression,
Expression rightExpression,
char escapeChar)
Constructs an instance of this class from a left and right expression
and an escape character
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
Object |
clone()
Deep copy of object
|
boolean |
equals(Object obj)
Override equals() method.
|
char |
getEscapeChar()
Get the escape character, which can be placed before the wildcard or single match
character in the expression to prevent it from being used as a wildcard or single
match.
|
Expression |
getLeftExpression()
Get left expression.
|
Like.MatchMode |
getMode() |
static Pattern |
getPattern(String newPattern,
String originalPattern,
int flags) |
Expression |
getRightExpression()
Get right expression.
|
int |
hashCode()
Get hash code.
|
boolean |
isNegated()
Returns whether this criteria is negated.
|
void |
negate() |
void |
setEscapeChar(char escapeChar)
Set the escape character which can be used when the wildcard or single
character should be used literally.
|
void |
setLeftExpression(Expression expression)
Set left expression.
|
void |
setMode(Like.MatchMode mode) |
void |
setNegated(boolean negationFlag)
Sets the negation flag for this criteria.
|
void |
setRightExpression(Expression expression)
Set right expression.
|
applyDemorgan, combineCriteria, combineCriteria, combineCriteria, getType, separateCriteriaByAnd, toString
public static final char WILDCARD_CHAR
public static final char MATCH_CHAR
public static final char NULL_ESCAPE_CHAR
public MatchCriteria()
public MatchCriteria(Expression leftExpression, Expression rightExpression)
leftExpression
- The expression to checkrightExpression
- The match expressionpublic MatchCriteria(Expression leftExpression, Expression rightExpression, char escapeChar)
leftExpression
- The expression to checkrightExpression
- The match expressionescapeChar
- The escape character, to allow literal use of wildcard and single match charspublic void setLeftExpression(Expression expression)
expression
- expressionpublic Expression getLeftExpression()
public void setRightExpression(Expression expression)
expression
- expressionpublic Expression getRightExpression()
public char getEscapeChar()
NULL_ESCAPE_CHAR
public void setEscapeChar(char escapeChar)
escapeChar
- New escape characterpublic boolean isNegated()
public void setNegated(boolean negationFlag)
negationFlag
- true if this criteria contains a NOT; false otherwisepublic void negate()
negate
in interface PredicateCriteria.Negatable
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic int hashCode()
public boolean equals(Object obj)
public Object clone()
clone
in interface LanguageObject
clone
in class PredicateCriteria
public static Pattern getPattern(String newPattern, String originalPattern, int flags) throws ExpressionEvaluationException
ExpressionEvaluationException
public Like.MatchMode getMode()
public void setMode(Like.MatchMode mode)
Copyright © 2018 JBoss by Red Hat. All rights reserved.