| java.lang.Object dinamica.AbstractModule dinamica.GenericTransaction dinamica.AbstractValidator dinamica.validators.SQLPatternTransformer
SQLPatternTransformer | public class SQLPatternTransformer extends AbstractValidator (Code) | | This validator transforms the value (if not null) of the corresponding
parameter, by appending a '%' at the end of the text or by enclosing the
the value between '%' characters.
It is used to create search patterns for SQL queries like 'value starts with..' that can
be used in sql LIKE expressions. Always returns TRUE.
As a preventtive measure, all occurrences of the '%' character in the parameter's value
will be erased before applying the transformation.
Requires the following custom attributes:
- parameter: Name of the request parameter to transform. This parameter
MUST be defined in validator.xml and must be of type VARCHAR.
- rule: a string that denotes the possible transformation, accepted
values are 'like' and 'contains'.
(c) 2005 Martin Cordova
This code is released under the LGPL license
Dinamica Framework - http://www.martincordova.com
author: Martin Cordova (dinamica@martincordova.com) |
|
|