Class StringSearchConfigTo
- java.lang.Object
-
- com.devonfw.module.basic.common.api.to.AbstractTo
-
- com.devonfw.module.basic.common.api.query.StringSearchConfigTo
-
- All Implemented Interfaces:
Serializable
public class StringSearchConfigTo extends AbstractTo
TO
for the options to search for a string value.- Since:
- 3.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringSearchConfigTo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class com.devonfw.module.basic.common.api.to.AbstractTo
toString, toString
-
-
-
-
Method Detail
-
isIgnoreCase
public boolean isIgnoreCase()
- Returns:
true
to ignore the case,false
otherwise (to search case-sensitive).
-
setIgnoreCase
public void setIgnoreCase(boolean ignoreCase)
- Parameters:
ignoreCase
- new value ofisIgnoreCase()
.
-
isMatchSubstring
public boolean isMatchSubstring()
- Returns:
- matchSubstring
true
if search string shall also match substrings of the string values to search on.
-
setMatchSubstring
public void setMatchSubstring(boolean matchSubstring)
- Parameters:
matchSubstring
- new value ofisMatchSubstring()
.
-
getLikeSyntax
public LikePatternSyntax getLikeSyntax()
- Returns:
- the
LikePatternSyntax
of the search string used to do a LIKE-search,null
for no LIKE-search. Shall benull
ifoperator
is neithernull
norStringSearchOperator.LIKE
.
-
setLikeSyntax
public void setLikeSyntax(LikePatternSyntax likeSyntax)
- Parameters:
likeSyntax
- new value ofgetLikeSyntax()
.
-
getOperator
public StringSearchOperator getOperator()
- Returns:
- operator the
StringSearchOperator
used to search. Ifnull
a "magic auto mode" is used whereStringSearchOperator.LIKE
is used in case the search string contains wildcards andStringSearchOperator.EQ
is used otherwise.
-
setOperator
public void setOperator(StringSearchOperator operator)
- Parameters:
operator
- new value ofgetOperator()
.
-
of
public static StringSearchConfigTo of(StringSearchOperator operator)
- Parameters:
operator
- theStringSearchOperator
.- Returns:
- a new
StringSearchConfigTo
with the given config.
-
of
public static StringSearchConfigTo of(LikePatternSyntax syntax)
- Parameters:
syntax
- theLikePatternSyntax
.- Returns:
- a new
StringSearchConfigTo
with the given config.
-
-