Expresso 5-6

com.jcorporate.expresso.core.db
Class DefaultEscapeHandler

java.lang.Object
  extended bycom.jcorporate.expresso.core.db.DefaultEscapeHandler
All Implemented Interfaces:
EscapeHandler

public class DefaultEscapeHandler
extends Object
implements EscapeHandler

This class character field filtering that is known to be compliant with the Firebird, MySQL and PostgreSQL databases. It replaces single backslashes with double backslashes. so that those characters are escaped. Currently "e; 's are simply removed as I haven't found a way to get the databases to accept them nicely.

Author:
Michael Rimov

Constructor Summary
DefaultEscapeHandler()
           
 
Method Summary
 String escapeString(String input)
          Escape a string so that all special characters for that database are properly escaped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEscapeHandler

public DefaultEscapeHandler()
Method Detail

escapeString

public String escapeString(String input)
Description copied from interface: EscapeHandler
Escape a string so that all special characters for that database are properly escaped.

Specified by:
escapeString in interface EscapeHandler
Parameters:
input - The string to filter
Returns:
a properly constructed string for your particular database.

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.