org.oreodata.predicates
Class SQLQueryUtil
java.lang.Object
  |
  +--org.oreodata.predicates.SQLQueryUtil
- public abstract class SQLQueryUtil
- extends java.lang.Object
  
a holder for various utility routines for parsing and building SQL queries.
 
| 
Method Summary | 
static java.lang.String | 
escapeString(java.lang.Object o)
 
            | 
static java.lang.String | 
from(java.lang.String query)
 
            | 
static boolean | 
matchLikeString(java.lang.String s,
                java.lang.String like)
 
          This is equivalent to calling matchLikeString(s, like, '\\') | 
static boolean | 
matchLikeString(java.lang.String s,
                java.lang.String like,
                char escape)
 
          A routine that does the Ansi SQL 'LIKE' comparison. | 
static java.lang.String | 
where(java.lang.String query)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
SQLQueryUtil
public SQLQueryUtil()
from
public static java.lang.String from(java.lang.String query)
- Returns:
 - the token right after the first occurence of "from"
 in the query.
 
 
where
public static java.lang.String where(java.lang.String query)
- Returns:
 - the string that comes after the first occurence of "where"
 
 
escapeString
public static java.lang.String escapeString(java.lang.Object o)
 
matchLikeString
public static boolean matchLikeString(java.lang.String s,
                                      java.lang.String like)
- This is equivalent to calling matchLikeString(s, like, '\\')
 
 
matchLikeString
public static boolean matchLikeString(java.lang.String s,
                                      java.lang.String like,
                                      char escape)
- A routine that does the Ansi SQL 'LIKE' comparison.
- Parameters:
 s - the string to comparelike - the expression to match againstescape - the escape character to put a literal '%' or '_'
               in the expression
- Returns:
 - true if this is a match.