org.w3c.tools.jdbc
Class SQL

java.lang.Object
  extended by org.w3c.tools.jdbc.SQL

public class SQL
extends java.lang.Object


Field Summary
static java.text.SimpleDateFormat formatter
           
 
Constructor Summary
SQL()
           
 
Method Summary
static java.lang.String encode(java.lang.String string)
           
static java.lang.Object getMatchingValue(java.lang.Class c, java.lang.Object value)
           
static java.lang.String[] getSQLOperator(java.lang.Object val)
          Split the SQL operator and the value, (default operator is '=') example:
"~*.*toto.*" will become { "~*", ".*toto.*" }
but "\~*.*toto.*" will become { "=", "~*.*toto.*" }
static java.lang.String getSQLValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formatter

public static java.text.SimpleDateFormat formatter
Constructor Detail

SQL

public SQL()
Method Detail

encode

public static java.lang.String encode(java.lang.String string)

getMatchingValue

public static java.lang.Object getMatchingValue(java.lang.Class c,
                                                java.lang.Object value)

getSQLValue

public static java.lang.String getSQLValue(java.lang.Object value)

getSQLOperator

public static java.lang.String[] getSQLOperator(java.lang.Object val)
Split the SQL operator and the value, (default operator is '=') example:
"~*.*toto.*" will become { "~*", ".*toto.*" }
but "\~*.*toto.*" will become { "=", "~*.*toto.*" }

possible operators are:

< Less than?
<= Less than or equals?
<> Not equal?
= Equals?
> Greater than?
>= Greater than or equals?
~~ LIKE
!~~ NOT LIKE
~ Match (regex), case sensitive
~* Match (regex), case insensitive
!~ Does not match (regex), case sensitive
!~* Does not match (regex), case insensitive