com.continuent.tungsten.replicator.database
Class TableMatcher
java.lang.Object
com.continuent.tungsten.replicator.database.TableMatcher
public class TableMatcher
- extends java.lang.Object
Matches schema and table names. Patterns used in matching are comma separated
lists, where each entry may have the following form:
- A schema name, for example "test"
- A fully qualified table name, for example "test.foo"
Schema and table names may contain * and ? characters, which substitute for a
series of characters or a single character, respectively. For example,
"test.*" matches all tables in database test, and "test?.foo" matches tables
"test1.foo" and "test2.foo" but not "test.foo".
- Version:
- 1.0
- Author:
- Stephane Giron
|
Method Summary |
boolean |
match(java.lang.String schema,
java.lang.String table)
Performs a scan of all rules to see if we have a match. |
void |
prepare(java.lang.String patternString)
Prepares matcher for use. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TableMatcher
public TableMatcher()
prepare
public void prepare(java.lang.String patternString)
- Prepares matcher for use.
- Parameters:
patternString - Schema/table pattern list.
match
public boolean match(java.lang.String schema,
java.lang.String table)
- Performs a scan of all rules to see if we have a match.
- Parameters:
schema - Schema nametable - Table name or null to match on schema only
- Returns:
- True if there is a match
toString
public java.lang.String toString()
-
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()