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
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
-
Method Summary
Methods inherited from class org.apache.velocity.app.event.implement.EscapeReference
getRuntimeServices, referenceInsert, setRuntimeServices
-
Constructor Details
-
EscapeSqlReference
public EscapeSqlReference()
-
-
Method Details
-
escape
Escapes the characters in a String to be suitable to pass to an SQL query.- Specified by:
escape
in classEscapeReference
- Parameters:
text
-- Returns:
- An escaped string.
-
getMatchAttribute
Description copied from class:EscapeReference
Specify the configuration attribute that specifies the regular expression. Ideally should be in a formeventhandler.escape.XYZ.match
where
XYZ
is the type of escaping being done.- Specified by:
getMatchAttribute
in classEscapeReference
- Returns:
- attribute "eventhandler.escape.sql.match"
-