public class SearchExpressionUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Collection<SearchOperator> |
CLAUSE_OPERATORS
Clause operators just join multiple expressions
|
Modifier and Type | Method and Description |
---|---|
static String[] |
parseBinaryOperatorValues(SearchOperator operator,
String expression) |
static String |
parsePostfixUnaryOperatorValue(SearchOperator operator,
String expression) |
static Predicate |
parsePredicates(String expression,
String property) |
static String |
parsePrefixUnaryOperatorValue(SearchOperator operator,
String expression) |
static Range |
parseRange(String rangeString) |
static Predicate |
parseSimplePredicate(String property,
String value) |
static String[] |
splitOnClauses(String expression)
Splits the expression by AND and OR operators.
|
static String[] |
splitOnOperators(String expression,
Collection<SearchOperator> operators)
Splits the expression by the given operators.
|
static String[] |
splitOnOperators(String expression,
SearchOperator... operators)
Splits the expression by the given operators.
|
static String |
stripClauseOperators(String expression)
Strips AND and OR operators from the expression string
|
static String |
stripOperators(String expression,
Collection<SearchOperator> operators)
Strips AND and OR operators from the expression string
|
static String |
stripOperators(String expression,
SearchOperator... operators)
Strips AND and OR operators from the expression string
|
public static final Collection<SearchOperator> CLAUSE_OPERATORS
public static String parsePrefixUnaryOperatorValue(SearchOperator operator, String expression)
public static String parsePostfixUnaryOperatorValue(SearchOperator operator, String expression)
public static String[] parseBinaryOperatorValues(SearchOperator operator, String expression)
public static String[] splitOnClauses(String expression)
expression
- the expression to parsepublic static String stripClauseOperators(String expression)
expression
- the expression to parsepublic static String[] splitOnOperators(String expression, Collection<SearchOperator> operators)
expression
- the expression to parsepublic static String[] splitOnOperators(String expression, SearchOperator... operators)
expression
- the expression to parsepublic static String stripOperators(String expression, Collection<SearchOperator> operators)
expression
- the expression to parsepublic static String stripOperators(String expression, SearchOperator... operators)
expression
- the expression to parsepublic static Range parseRange(String rangeString)
public static Predicate parsePredicates(String expression, String property)
public static Predicate parseSimplePredicate(String property, String value)
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.