public abstract class RegExQueryFilter extends AbstractQueryFilter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.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 java.util.regex.Pattern |
compileQuery(java.lang.String query)
Compiles the regex query to a pattern.
|
protected java.util.List |
filterCollectionUsingRegEx(java.util.Map regex,
java.util.List data)
Filter the specified colleciton using the regex patterns extracted.
|
protected boolean |
isRegularExpression(java.lang.String query)
Checks if a given string is a regular expression query.
|
protected abstract boolean |
matches(java.lang.Object data,
java.util.Map regex)
Determines how the object is to be matched to the regex map.
|
java.util.List |
query(java.util.List queries)
Separates the regular expressions queries from the usual queries.
|
querypublic static final java.lang.String REGEX_PREFIX
protected RegExQueryFilter(QueryFilter next)
next - public java.util.List query(java.util.List queries)
throws java.lang.Exception
queries - - list of queriesjava.lang.Exceptionprotected boolean isRegularExpression(java.lang.String query)
query - protected java.util.regex.Pattern compileQuery(java.lang.String query)
query - - query string to compileprotected java.util.List filterCollectionUsingRegEx(java.util.Map regex,
java.util.List data)
throws java.lang.Exception
regex - - regex mapdata - - list of objects to filterjava.lang.Exceptionprotected abstract boolean matches(java.lang.Object data,
java.util.Map regex)
throws java.lang.Exception
data - - object to matchregex - - regex mapjava.lang.ExceptionCopyright © 2005-2016 Red Hat, Inc.. All Rights Reserved.