java.lang.Object
org.firebirdsql.jdbc.metadata.MetadataPatternMatcher
Emulates behavior of a database metadata pattern.
This behaves similar to (but not 100% identical to) a SQL LIKE
pattern with ESCAPE '\'
clause.
This implementation is not thread-safe.
- Since:
- 4.0
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataPatternMatcher
fromPattern
(MetadataPattern metadataPattern) Derives a metadata pattern matcher from a metadata pattern instance.abstract boolean
Checks ifvalue
matches the pattern of this matcher.static String
patternToRegex
(String metadataPattern) Creates a regular expression pattern equivalent to the provided database metadata pattern.
-
Method Details
-
fromPattern
Derives a metadata pattern matcher from a metadata pattern instance.- Parameters:
metadataPattern
- Metadata pattern instance- Returns:
- Matcher for
metadataPattern
-
matches
Checks ifvalue
matches the pattern of this matcher.This method is not thread-safe.
- Parameters:
value
- Value to check- Returns:
true
ifvalue
matches this pattern,false
otherwise
-
patternToRegex
Creates a regular expression pattern equivalent to the provided database metadata pattern.- Parameters:
metadataPattern
- database metadata pattern- Returns:
- Pattern for the provided like string.
-