|
Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services 11g Release 1 (11.1.1) E14650-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.jps.search.SearchQuery
oracle.security.jps.service.policystore.search.BaseSearchQuery
oracle.security.jps.service.policystore.search.RoleCategorySearchQuery
public class RoleCategorySearchQuery
A SearchQuery instance is not synchronized against concurrent multithreaded access. Multiple threads should not try to modify the SearchQuery as it is not thread-safe and not going to be a thread-safe object in future.
Following code snippet illustrates how to build a search criteria to search by the DisplayName
RoleCategorySearchQuery query = new RoleCategorySearchQuery(); query.addQuery ( RoleCategorySearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "DisplayName Value to searchBy", RoleCategorySearchQuery.MATCHER.EXACT); getRoleCategories ( query );
To build more complex search criterias, use the addQuery
to add more search criterias.
Consider the following example to search Resources by a specific description and display name. Since we have two criteria that should be true in tandem, hence they have to be AND-ed as shown next.
RoleCategorySearchQuery query = new RoleCategorySearchQuery(); query.addQuery ( RoleCategorySearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "The display name value", RoleCategorySearchQuery.MATCHER.EXACT); query.addQuery ( RoleCategorySearchQuery.SEARCH_PROPERTY.DESCRIPTION, false, ComparatorType.EQUALITY, "The description value", RoleCategorySearchQuery.MATCHER.EXACT); query.setANDMatch();
Similarly, an OR-ed complex query can be constructed (when either of the constituent criterion, if true, would match a type)
RoleCategorySearchQuery query = new RoleCategorySearchQuery(); query.addQuery ( RoleCategorySearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "The display name value", RoleCategorySearchQuery.MATCHER.EXACT); query.addQuery ( RoleCategorySearchQuery.SEARCH_PROPERTY.DESCRIPTION, false, ComparatorType.EQUALITY, "The description value", RoleCategorySearchQuery.MATCHER.EXACT); query.setORDMatch();
Nested Class Summary | |
---|---|
static class |
RoleCategorySearchQuery.SEARCH_PROPERTY Criterias to search a role category By |
Nested classes/interfaces inherited from class oracle.security.jps.search.SearchQuery |
---|
SearchQuery.MATCHER |
Constructor Summary | |
---|---|
RoleCategorySearchQuery() No arg constructor |
Method Summary | |
---|---|
void |
addQuery(RoleCategorySearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match) Add a RoleCategorySearchQuery to this RoleCategorySearchQuery. |
void |
addQuery(RoleCategorySearchQuery query) Add a preconfigured RoleCategorySearchQuery |
RoleCategorySearchQuery.SEARCH_PROPERTY |
getSearchByProperty() Get the search property to use in the search. |
RoleCategorySearchQuery[] |
getSearchQueryInOrder() Get all added queries in the order they were added. |
Methods inherited from class oracle.security.jps.service.policystore.search.BaseSearchQuery |
---|
getBaseSearchQueryInOrder, getComparator, getEntityType, getQueries, toString |
Methods inherited from class oracle.security.jps.search.SearchQuery |
---|
addBaseQuery, getSearchByPropertyString, getSearchByValue, getSearchByValueObject, getSearchComparator, getSearchQueries, getSearchValueMatch, isANDMatch, isComplexQuery, isNegativeMatch, isORMatch |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RoleCategorySearchQuery()
Method Detail |
---|
public void addQuery(RoleCategorySearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match)
property
- -- search propertynegation
- - negate the search?operator
- -- Type of comparisonvalue
- -- value to search formatch
- -- matching to be performed.public void addQuery(RoleCategorySearchQuery query)
query
- -- query to be added.public RoleCategorySearchQuery.SEARCH_PROPERTY getSearchByProperty()
public RoleCategorySearchQuery[] getSearchQueryInOrder()
|
Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services 11g Release 1 (11.1.1) E14650-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |