net.xoetrope.optional.data.sql
Class SqlHelper

java.lang.Object
  extended by net.xoetrope.optional.data.sql.SqlHelper

public class SqlHelper
extends java.lang.Object

A set of helpers to help with SQL generation

Copyright (c) Xoetrope Ltd. 2001-2006

$Revision: 2.11 $ License: see license.txt


Constructor Summary
SqlHelper()
           
 
Method Summary
static java.lang.String escapeQuotes(java.lang.String s)
          Escape quotes in a string
static java.lang.String getEscapeClause()
          Get the escape clause to append to escaped SQL commands
static void setEscapeCharacter(java.lang.String s)
          Set the escape character
static void setEscapeClause(java.lang.String clause)
          Get the escape clause to append to escaped SQL commands
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlHelper

public SqlHelper()
Method Detail

escapeQuotes

public static java.lang.String escapeQuotes(java.lang.String s)
Escape quotes in a string

Parameters:
s - the source string
Returns:
the escaped string

getEscapeClause

public static java.lang.String getEscapeClause()
Get the escape clause to append to escaped SQL commands

Returns:
the escape clause e.g {escape '\'}

setEscapeCharacter

public static void setEscapeCharacter(java.lang.String s)
Set the escape character

Parameters:
c - the new escape character

setEscapeClause

public static void setEscapeClause(java.lang.String clause)
Get the escape clause to append to escaped SQL commands

Parameters:
clause - the new escape clause