org.formaria.sql
Class StringUtilities

java.lang.Object
  extended by org.formaria.sql.StringUtilities

public class StringUtilities
extends java.lang.Object

String utilities for use with SQL queries

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.4 $


Constructor Summary
StringUtilities()
           
 
Method Summary
static java.lang.String escape(java.lang.String s)
          Escape special characters in preparation for use in SQL statements
static java.lang.String getBlankString(java.lang.String s)
          Return a blank/empty if the argument is null
static boolean isBlankOrNull(java.lang.String s)
          Check to see if a string is null or blank
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtilities

public StringUtilities()
Method Detail

isBlankOrNull

public static boolean isBlankOrNull(java.lang.String s)
Check to see if a string is null or blank

Parameters:
s - the stringto check
Returns:
true if the string is null or zero length, otherwise false is rturned

getBlankString

public static java.lang.String getBlankString(java.lang.String s)
Return a blank/empty if the argument is null

Parameters:
s - the string to check
Returns:
the string or a blank

escape

public static java.lang.String escape(java.lang.String s)
Escape special characters in preparation for use in SQL statements

Parameters:
s - the string to check
Returns:
the escaped string