- All Known Implementing Classes:
LikeOption.Escape,LikeOption.Infix,LikeOption.None,LikeOption.Prefix,LikeOption.Suffix
public interface LikeOption
Represents the option about the LIKE operator.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic classstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charThe default escape character -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(LikeOption.Visitor visitor) Accepts a visitor.static LikeOptionescape()Indicates that the option escapes the LIKE operand with the default escape character $.static LikeOptionescape(char escapeChar) Indicates that the option escapes the LIKE operand withescapeChar.static LikeOptioninfix()Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start and the end.static LikeOptioninfix(char escapeChar) Indicates that the option escape the LIKE operand withescapeCharand concatenates a wildcard at the start and the end.static LikeOptionnone()Indicates that the option does nothing.static LikeOptionprefix()Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the end.static LikeOptionprefix(char escapeChar) Indicates that the option escape the LIKE operand withescapeCharand concatenates a wildcard at the end.static LikeOptionsuffix()Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start.static LikeOptionsuffix(char escapeChar) Indicates that the option escape the LIKE operand withescapeCharand concatenates a wildcard at the start.
-
Field Details
-
DEFAULT_ESCAPE_CHAR
static final char DEFAULT_ESCAPE_CHARThe default escape character- See Also:
-
-
Method Details
-
none
Indicates that the option does nothing.- Returns:
- the option
-
escape
Indicates that the option escapes the LIKE operand with the default escape character $.- Returns:
- the option
-
escape
Indicates that the option escapes the LIKE operand withescapeChar.- Parameters:
escapeChar- the escape character- Returns:
- the option
-
prefix
Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the end.For example,
a%b_will be converted to the aa$%b$_.- Returns:
- the option
-
prefix
Indicates that the option escape the LIKE operand withescapeCharand concatenates a wildcard at the end.For example,
a%b_is converted to the aa$%b$_.- Parameters:
escapeChar- the escape character- Returns:
- the option
-
infix
Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start and the end.For example,
a%b_is converted to the a%a$%b$_%.- Returns:
- the option
-
infix
Indicates that the option escape the LIKE operand withescapeCharand concatenates a wildcard at the start and the end.For example,
a%b_is converted to the a%a$%b$_%.- Parameters:
escapeChar- the escape character- Returns:
- the option
-
suffix
Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start.For example,
a%b_is converted to the a%a$%b$_.- Returns:
- the option
-
suffix
Indicates that the option escape the LIKE operand withescapeCharand concatenates a wildcard at the start.For example,
a%b_is converted to the a%a$%b$_.- Parameters:
escapeChar- the escape character- Returns:
- the option
-
accept
Accepts a visitor.- Parameters:
visitor- a visitor
-