public class RASResourceSearchQuery extends BaseSearchQuery
Following code snippet illustrates how to build a search criteria to search by the DisplayName
RASResourceSearchQuery query = new RASResourceSearchQuery( RASResourceSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "DisplayName Value to searchBy", BaseSearchQuery.MATCHER.EXACT); getRASResources ( query );
To build more complex search criteria, use the Constructor for complex search query.
Consider the following example to search Resources by a specific description and display name. Obviously, the two criteria (below) have to be AND-ed.
List<RASResourceSearchQuery> list = new ArrayList<RASResourceSearchQuery>(); list.add(new RASResourceSearchQuery( RASResourceSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT)); list.add(new RASResourceSearchQuery( RASResourceSearchQuery.SEARCH_PROPERTY.DESCRIPTION, false, ComparatorType.EQUALITY, "The Description", BaseSearchQuery.MATCHER.EXACT)); RASResourceSearchQuery query = new RASResourceSearchQuery(list, false, false);
Similarly, we can have two criteria OR-ed as below.
List<RASResourceSearchQuery> list = new ArrayList<RASResourceSearchQuery>(); list.add(new RASResourceSearchQuery( RASResourceSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT)); list.add(new RASResourceSearchQuery( RASResourceSearchQuery.SEARCH_PROPERTY.DESCRIPTION, false, ComparatorType.EQUALITY, "The Description", BaseSearchQuery.MATCHER.EXACT)); RASResourceSearchQuery query = new RASResourceSearchQuery(list, false, true);
oracle.security.jps.service.policystore.entitymanager.RASResourceManager.getRASResources(oracle.security.jps.service.policystore.search.RASResourceSearchQuery)
Modifier and Type | Class and Description |
---|---|
static class |
RASResourceSearchQuery.SEARCH_PROPERTY
Criteria to search a Resource By
|
SearchQuery.MATCHER
Constructor and Description |
---|
RASResourceSearchQuery(java.util.List<RASResourceSearchQuery> childQueries, boolean negation, boolean isORMatch)
Constructor for a complex Resource Search Query
|
RASResourceSearchQuery(RASResourceSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.Object value, SearchQuery.MATCHER m)
Protected constructor (off limits to clients).
|
Modifier and Type | Method and Description |
---|---|
RASResourceSearchQuery.SEARCH_PROPERTY |
getSearchByProperty()
Get the search property to use in the search.
|
RASResourceSearchQuery[] |
getSearchQueryInOrder()
Get all added queries in the order they were added.
|
getBaseSearchQueryInOrder, getComparator, getEntityType, getQueries, toString
addBaseQuery, getPageInfo, getPreparedQueryId, getSearchByPropertyString, getSearchByValue, getSearchByValueObject, getSearchComparator, getSearchQueries, getSearchValueMatch, hasPageInfo, isANDMatch, isComplexQuery, isNegativeMatch, isORMatch, setPageInfo, setPreparedQueryId, unsetPageInfo
public RASResourceSearchQuery(java.util.List<RASResourceSearchQuery> childQueries, boolean negation, boolean isORMatch)
childQueries
-negation
-isORMatch
-public RASResourceSearchQuery(RASResourceSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.Object value, SearchQuery.MATCHER m)
property
- -- search property, See RASResourceSearchQuery.SEARCH_PROPERTY
for list of valid valuesnegation
- -- negate the search?operator
- -- Type of comparisonvalue
- -- value to search form
- -- matching to be performed.public RASResourceSearchQuery.SEARCH_PROPERTY getSearchByProperty()
public RASResourceSearchQuery[] getSearchQueryInOrder()