@InternalApi public final class MetadataPattern extends java.lang.Object
Provides information whether the pattern is the all-pattern, or if the condition needs a normal equality comparison,
a SQL LIKE
, or a SQL STARTING WITH
.
Modifier and Type | Class and Description |
---|---|
static class |
MetadataPattern.ConditionType |
Modifier and Type | Method and Description |
---|---|
static MetadataPattern |
compile(java.lang.String metadataPattern)
Compiles the metadata pattern.
|
static boolean |
containsPatternSpecialChars(java.lang.String pattern)
Scans string to determine if string contains any of
\_% that indicates additional processing is needed. |
static java.lang.String |
escapeWildcards(java.lang.String objectName)
Escapes the like wildcards and escape (
\_% in the provided search string with a \ . |
MetadataPattern.ConditionType |
getConditionType() |
java.lang.String |
getConditionValue() |
static boolean |
isAllCondition(java.lang.String metadataPattern) |
static boolean |
isPatternSpecialChar(char charVal)
Checks if character is a database metadata pattern special.
|
java.lang.String |
renderCondition(java.lang.String columnName)
Renders the condition for this pattern.
|
MetadataPatternMatcher |
toMetadataPatternMatcher() |
public MetadataPattern.ConditionType getConditionType()
public java.lang.String getConditionValue()
null
signals no conditionpublic java.lang.String renderCondition(java.lang.String columnName)
columnName
- column namepublic MetadataPatternMatcher toMetadataPatternMatcher()
public static MetadataPattern compile(java.lang.String metadataPattern)
metadataPattern
- Metadata pattern stringpublic static boolean containsPatternSpecialChars(java.lang.String pattern)
\_%
that indicates additional processing is needed.pattern
- metadata patterntrue
if the string contains any like special characterspublic static boolean isPatternSpecialChar(char charVal)
charVal
- Character to checktrue
if charVal
is a pattern special (\_%
)public static java.lang.String escapeWildcards(java.lang.String objectName)
\_%
in the provided search string with a \
.objectName
- Object name to escape.public static boolean isAllCondition(java.lang.String metadataPattern)
Copyright © 2001-2020 Jaybird (Firebird JDBC/JCA) team. All rights reserved.