Class EscapeSqlReference
- java.lang.Object
-
- org.apache.velocity.app.event.implement.EscapeReference
-
- org.apache.velocity.app.event.implement.EscapeSqlReference
-
- All Implemented Interfaces:
EventHandler,ReferenceInsertionEventHandler,RuntimeServicesAware
public class EscapeSqlReference extends EscapeReference
Escapes the characters in a String to be suitable to pass to an SQL query.- Since:
- 1.5
- Author:
- wglass
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.app.event.implement.EscapeReference
log
-
-
Constructor Summary
Constructors Constructor Description EscapeSqlReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringescape(Object text)Escapes the characters in a String to be suitable to pass to an SQL query.protected StringgetMatchAttribute()Specify the configuration attribute that specifies the regular expression.-
Methods inherited from class org.apache.velocity.app.event.implement.EscapeReference
getRuntimeServices, referenceInsert, setRuntimeServices
-
-
-
-
Method Detail
-
escape
protected String escape(Object text)
Escapes the characters in a String to be suitable to pass to an SQL query.- Specified by:
escapein classEscapeReference- Parameters:
text-- Returns:
- An escaped string.
-
getMatchAttribute
protected String getMatchAttribute()
Description copied from class:EscapeReferenceSpecify the configuration attribute that specifies the regular expression. Ideally should be in a formeventhandler.escape.XYZ.matchwhere
XYZis the type of escaping being done.- Specified by:
getMatchAttributein classEscapeReference- Returns:
- attribute "eventhandler.escape.sql.match"
-
-