public class StringSearchConfigTo extends AbstractTo
TO
for the options to search for a string value.Modifier and Type | Field and Description |
---|---|
private boolean |
ignoreCase |
private LikePatternSyntax |
likeSyntax |
private boolean |
matchSubstring |
private StringSearchOperator |
operator |
private static long |
serialVersionUID |
Constructor and Description |
---|
StringSearchConfigTo() |
Modifier and Type | Method and Description |
---|---|
LikePatternSyntax |
getLikeSyntax() |
StringSearchOperator |
getOperator() |
boolean |
isIgnoreCase() |
boolean |
isMatchSubstring() |
static StringSearchConfigTo |
of(LikePatternSyntax syntax) |
static StringSearchConfigTo |
of(StringSearchOperator operator) |
void |
setIgnoreCase(boolean ignoreCase) |
void |
setLikeSyntax(LikePatternSyntax likeSyntax) |
void |
setMatchSubstring(boolean matchSubstring) |
void |
setOperator(StringSearchOperator operator) |
toString, toString
private static final long serialVersionUID
private boolean ignoreCase
private boolean matchSubstring
private LikePatternSyntax likeSyntax
private StringSearchOperator operator
public boolean isIgnoreCase()
true
to ignore the case, false
otherwise (to search case-sensitive).public void setIgnoreCase(boolean ignoreCase)
ignoreCase
- new value of isIgnoreCase()
.public boolean isMatchSubstring()
true
if search string shall also match substrings of the string values to search on.public void setMatchSubstring(boolean matchSubstring)
matchSubstring
- new value of isMatchSubstring()
.public LikePatternSyntax getLikeSyntax()
LikePatternSyntax
of the search string used to do a LIKE-search, null
for no
LIKE-search. Shall be null
if operator
is neither null
nor
StringSearchOperator.LIKE
.public void setLikeSyntax(LikePatternSyntax likeSyntax)
likeSyntax
- new value of getLikeSyntax()
.public StringSearchOperator getOperator()
StringSearchOperator
used to search. If null
a "magic auto mode" is used where
StringSearchOperator.LIKE
is used in case the search string contains wildcards and
StringSearchOperator.EQ
is used otherwise.public void setOperator(StringSearchOperator operator)
operator
- new value of getOperator()
.public static StringSearchConfigTo of(StringSearchOperator operator)
operator
- the StringSearchOperator
.StringSearchConfigTo
with the given config.public static StringSearchConfigTo of(LikePatternSyntax syntax)
syntax
- the LikePatternSyntax
.StringSearchConfigTo
with the given config.Copyright © 2014–2019 devon4j-Team. All rights reserved.