public class DBRegExpTokenMapping extends java.lang.Object implements IDBTokenMappings
Constructor and Description |
---|
DBRegExpTokenMapping(java.lang.String mysqlRegexp,
java.lang.String nativeToken)
Used to construct a regular expression token mapping.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.String token)
Part of the SQL is passed into this method.
|
java.lang.String |
getNativeToken()
If this mapping handled a token with
accept(String) was called,
then this will return the replacement token. |
public DBRegExpTokenMapping(java.lang.String mysqlRegexp, java.lang.String nativeToken)
mysqlRegexp
- The regular expression to match on.nativeToken
- The returned token pattern.public boolean accept(java.lang.String token)
accept
in interface IDBTokenMappings
token
- The SQL token that is been checkedpublic java.lang.String getNativeToken()
accept(String)
was called,
then this will return the replacement token.getNativeToken
in interface IDBTokenMappings