|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dataobjects.jdbc.FieldRangeParser
The responsibilities of this class is to verify range values for fields and throw an exception if there is any 'monkeybusiness' detected in the field.
The parser does not allow everything a normal SQL query would allows due to parsing complexity. However, it will allow multiple conditions, and ranges for BETWEEN and IN.Accepted Range Strings:
Known bugs with Range issues:
Instances of FieldRangeParser are meant to use shared between threads
| Constructor Summary | |
FieldRangeParser()
Default constructor. |
|
| Method Summary | |
String |
denotesRange(String fieldValue)
Does a given field value denote a range? |
static FieldRangeParser |
getInstance()
Retrieve an instance of the field range parser. |
protected org.apache.oro.text.regex.PatternMatcher |
getMatcher()
Retrieves an instance of a perl5 pattern matcher that is thread local to be thread safe. |
boolean |
isValidRange(DataFieldMetaData metadata,
String fieldValue)
Performs some basic checks to validate the syntax of the range field value given the system to help protect against nasty things like sql injection |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FieldRangeParser()
| Method Detail |
protected org.apache.oro.text.regex.PatternMatcher getMatcher()
public static FieldRangeParser getInstance()
public boolean isValidRange(DataFieldMetaData metadata,
String fieldValue)
metadata - the field metadata to be checking against.fieldValue - the field value to check
public String denotesRange(String fieldValue)
fieldValue - The field value to check against.
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||