public final class RASPolicyRuleSearchQuery extends BaseSearchQuery
Following code snippet illustrates how to build a search criteria to search by the DisplayName
RASPolicyRuleSearchQuery query = new RASPolicyRuleSearchQuery( RASPolicyRuleSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
false, ComparatorType.EQUALITY, "DisplayName Value to searchBy", BaseSearchQuery.MATCHER.EXACT);
getRASPolicyRules ( query );
To build more complex search criteria, use the Constructor for complex search query.
Consider the following example to search AppRoles by a specific description and display name. Obviously, the two criteria (below) have to be AND-ed.
List<RASPolicyRuleSearchQuery> list = new ArrayList<RASPolicyRuleSearchQuery>();
list.add(new RASPolicyRuleSearchQuery( RASPolicyRuleSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT));
list.add(new RASPolicyRuleSearchQuery( RASPolicyRuleSearchQuery.SEARCH_PROPERTY.DESCRIPTION,
false, ComparatorType.EQUALITY, "The Description", BaseSearchQuery.MATCHER.EXACT));
RASPolicyRuleSearchQuery query = new RASPolicyRuleSearchQuery(list, false, false);
Similarly, we can have two criteria OR-ed as below.
List<RASPolicyRuleSearchQuery> list = new ArrayList<RASPolicyRuleSearchQuery>();
list.add(new RASPolicyRuleSearchQuery( RASPolicyRuleSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT));
list.add(new RASPolicyRuleSearchQuery( RASPolicyRuleSearchQuery.SEARCH_PROPERTY.DESCRIPTION,
false, ComparatorType.EQUALITY, "The Description", BaseSearchQuery.MATCHER.EXACT));
RASPolicyRuleSearchQuery query = new RASPolicyRuleSearchQuery(list, false, true);
| Modifier and Type | Class and Description |
|---|---|
static class |
RASPolicyRuleSearchQuery.SEARCH_PROPERTY
Search properties definition
|
SearchQuery.MATCHER| Constructor and Description |
|---|
RASPolicyRuleSearchQuery(java.util.List<RASPolicyRuleSearchQuery> queries, boolean negation, boolean isORMatch)
Constructor for a complex RAS policy rule Search Query
|
RASPolicyRuleSearchQuery(RASPolicyRuleSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.Object valueObject, SearchQuery.MATCHER match)
Constructor for a simple RAS policy rule Search Query.
|
RASPolicyRuleSearchQuery(RASPolicyRuleSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match)
Constructor for a simple RAS policy rule Search Query.
|
| Modifier and Type | Method and Description |
|---|---|
RASPolicyRuleSearchQuery.SEARCH_PROPERTY |
getSearchByProperty()
get the search by property in this search query
|
RASPolicyRuleSearchQuery[] |
getSearchQueryInOrder()
Get the child search query in this search query.
|
getBaseSearchQueryInOrder, getComparator, getEntityType, getQueries, toStringaddBaseQuery, getPageInfo, getPreparedQueryId, getSearchByPropertyString, getSearchByValue, getSearchByValueObject, getSearchComparator, getSearchQueries, getSearchValueMatch, hasPageInfo, isANDMatch, isComplexQuery, isNegativeMatch, isORMatch, setPageInfo, setPreparedQueryId, unsetPageInfopublic RASPolicyRuleSearchQuery(RASPolicyRuleSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match)
property - search property, See RASPolicyRuleSearchQuery.SEARCH_PROPERTY for list of valid valuesnegation - whether the query result must be negated.operator - comparison operator, See ComparatorType for list of valid values.value - value to be compared.matcher - type of matcher, See SearchQuery.MATCHER for list of valid values.public RASPolicyRuleSearchQuery(RASPolicyRuleSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.Object valueObject, SearchQuery.MATCHER match)
property - search property, See RASPolicyRuleSearchQuery.SEARCH_PROPERTY for list of valid valuesnegation - whether the query result must be negated.operator - comparison operator, See ComparatorType for list of valid values.objectValue - value to be compared.matcher - type of matcher, See SearchQuery.MATCHER for list of valid values.public RASPolicyRuleSearchQuery(java.util.List<RASPolicyRuleSearchQuery> queries, boolean negation, boolean isORMatch)
childQueries - child queries for the complex query.negation - whether the query result must be negated.isORMatch - whether the child queries are an OR match.public RASPolicyRuleSearchQuery.SEARCH_PROPERTY getSearchByProperty()
public RASPolicyRuleSearchQuery[] getSearchQueryInOrder()