public abstract class RegExQueryFilter extends AbstractQueryFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
REGEX_PREFIX |
nextQUERY_DELIMETER| Modifier | Constructor and Description |
|---|---|
protected |
RegExQueryFilter(QueryFilter next)
Creates a regular expression query that is able to match an object using
key-value pattern regex filtering
|
| Modifier and Type | Method and Description |
|---|---|
protected Pattern |
compileQuery(String query)
Compiles the regex query to a pattern.
|
protected List |
filterCollectionUsingRegEx(Map regex,
List data)
Filter the specified colleciton using the regex patterns extracted.
|
protected boolean |
isRegularExpression(String query)
Checks if a given string is a regular expression query.
|
protected abstract boolean |
matches(Object data,
Map regex)
Determines how the object is to be matched to the regex map.
|
List |
query(List queries)
Separates the regular expressions queries from the usual queries.
|
querypublic static final String REGEX_PREFIX
protected RegExQueryFilter(QueryFilter next)
next - public List query(List queries) throws Exception
queries - - list of queriesExceptionprotected boolean isRegularExpression(String query)
query - protected Pattern compileQuery(String query)
query - - query string to compileprotected List filterCollectionUsingRegEx(Map regex, List data) throws Exception
regex - - regex mapdata - - list of objects to filterExceptionCopyright © 2005–2018 FuseSource, Corp.. All rights reserved.