| java.lang.Object com.mockrunner.jdbc.SQLStatementMatcher
SQLStatementMatcher | public class SQLStatementMatcher (Code) | | Helper class for finding matching SQL statements based on various
search parameters. The search parameters are:
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 Summary | |
public | SQLStatementMatcher(boolean caseSensitive, boolean exactMatch) | public | SQLStatementMatcher(boolean caseSensitive, boolean exactMatch, boolean useRegularExpressions) |
SQLStatementMatcher | public SQLStatementMatcher(boolean caseSensitive, boolean exactMatch)(Code) | | |
SQLStatementMatcher | public SQLStatementMatcher(boolean caseSensitive, boolean exactMatch, boolean useRegularExpressions)(Code) | | |
contains | public boolean contains(Collection col, String query, boolean queryContainsData)(Code) | | Compares all elements in the specified Collection with the
specified query string using the method
SQLStatementMatcher.doStringsMatch .
Parameters: col - the Collections Parameters: query - the query string that must match the keys in col Parameters: queryContainsData - 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 otherwise |
doStringsMatch | public boolean doStringsMatch(String source, String query)(Code) | | Compares two strings and returns if they match.
Parameters: query - the query string that must match source Parameters: source - the source string true of the strings match, false otherwise |
getMatchingObjects | public List getMatchingObjects(Map dataMap, String query, boolean resolveCollection, boolean queryContainsMapData)(Code) | | Compares all keys in the specified Map with the
specified query string using the method
SQLStatementMatcher.doStringsMatch .
If the strings match, the corresponding object from the Map
is added to the resulting List .
Parameters: dataMap - the source Map Parameters: query - the query string that must match the keys in dataMap Parameters: queryContainsMapData - 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 ) the result List |
|
|