Package org.datanucleus.util
Class RegularExpressionConverter
- java.lang.Object
-
- org.datanucleus.util.RegularExpressionConverter
-
public class RegularExpressionConverter extends java.lang.Object
Converter for a "matches" regular expression replacing the Java regular expression constructs with datastore-specific constructs.
-
-
Field Summary
Fields Modifier and Type Field Description private char
anyChar
private char
escapeChar
private char
zeroOrMoreChar
-
Constructor Summary
Constructors Constructor Description RegularExpressionConverter(char zeroOrMoreChar, char anyChar, char escapeChar)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
convert(java.lang.String input)
Convert a regular expression from Java to use the specified constructs.
-
-
-
Constructor Detail
-
RegularExpressionConverter
public RegularExpressionConverter(char zeroOrMoreChar, char anyChar, char escapeChar)
Constructor.- Parameters:
zeroOrMoreChar
- The pattern string for representing zero or more characters. Most of databases will use the percent sign character.anyChar
- The pattern string for representing one character. Most of databases will use the underscore character.escapeChar
- The pattern string for representing to escape zeroOrMoreChar or anyChar. Most of databases will use the backslash \ character.
-
-