public class SQLStatementMatcher extends Object
caseSensitive do a case sensitive match (default is false)
exactMatch the strings must match exactly, the parameter caseSensitive
is recognized, but useRegularExpression is irrelevant,
if exactMatch is true (default is false)
useRegularExpression use regular expressions for matching, if this parameter is
false, strings match, if one string starts with the other
(default is false)| Constructor and Description |
|---|
SQLStatementMatcher(boolean caseSensitive,
boolean exactMatch) |
SQLStatementMatcher(boolean caseSensitive,
boolean exactMatch,
boolean useRegularExpressions) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Collection col,
String query,
boolean queryContainsData)
Compares all elements in the specified
Collection with the
specified query string using the method doStringsMatch(java.lang.String, java.lang.String). |
boolean |
doStringsMatch(String source,
String query)
Compares two strings and returns if they match.
|
List |
getMatchingObjects(Map dataMap,
String query,
boolean resolveCollection,
boolean queryContainsMapData)
Compares all keys in the specified
Map with the
specified query string using the method doStringsMatch(java.lang.String, java.lang.String). |
public SQLStatementMatcher(boolean caseSensitive,
boolean exactMatch)
public SQLStatementMatcher(boolean caseSensitive,
boolean exactMatch,
boolean useRegularExpressions)
public List getMatchingObjects(Map dataMap, String query, boolean resolveCollection, boolean queryContainsMapData)
Map with the
specified query string using the method doStringsMatch(java.lang.String, java.lang.String).
If the strings match, the corresponding object from the Map
is added to the resulting List.dataMap - the source Mapquery - the query string that must match the keys in dataMapqueryContainsMapData - only matters if isExactMatch is false,
specifies if query must be contained in the Map keys (false)
or if query must contain the Map keys (true)Listpublic boolean contains(Collection col, String query, boolean queryContainsData)
Collection with the
specified query string using the method doStringsMatch(java.lang.String, java.lang.String).col - the Collectionsquery - the query string that must match the keys in colqueryContainsData - only matters if exactMatch is false,
specifies if query must be contained in the Collection data (false)
or if query must contain the Collection data (true)true if col contains query, false otherwiseCopyright © 2003-2014. All Rights Reserved.