org.objectweb.cjdbc.controller.backend.rewriting
Class SimpleRewritingRule
java.lang.Object
org.objectweb.cjdbc.controller.backend.rewriting.AbstractRewritingRule
org.objectweb.cjdbc.controller.backend.rewriting.SimpleRewritingRule
- public class SimpleRewritingRule
- extends AbstractRewritingRule
This class defines a SimpleRewritingRule
- Version:
- 1.0
- Author:
- Emmanuel Cecchet
Constructor Summary |
SimpleRewritingRule(java.lang.String queryPattern,
java.lang.String rewrite,
boolean caseSensitive,
boolean stopOnMatch)
Creates a new SimpleRewritingRule.java object |
Method Summary |
java.lang.String |
rewrite(java.lang.String sqlQuery)
Rewrite the given query according to the rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
queryPatternLength
private int queryPatternLength
SimpleRewritingRule
public SimpleRewritingRule(java.lang.String queryPattern,
java.lang.String rewrite,
boolean caseSensitive,
boolean stopOnMatch)
- Creates a new
SimpleRewritingRule.java
object
- Parameters:
queryPattern
- SQL pattern to matchrewrite
- rewritten SQL querycaseSensitive
- true if matching is case sensitivestopOnMatch
- true if rewriting must stop after this rule if it
matches.
rewrite
public java.lang.String rewrite(java.lang.String sqlQuery)
- Description copied from class:
AbstractRewritingRule
- Rewrite the given query according to the rule. Note that this method does
not check if the given query matches the rule or not. You must call
matches(String) before calling this method.
- Specified by:
rewrite
in class AbstractRewritingRule
- Parameters:
sqlQuery
- request to rewrite
- Returns:
- the rewritten SQL query according to the rule.
- See Also:
AbstractRewritingRule.rewrite(java.lang.String)
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.