Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-03


oracle.security.jps.service.policystore.search
Class RoleCategorySearchQuery

java.lang.Object
  extended by oracle.security.jps.search.SearchQuery
      extended by oracle.security.jps.service.policystore.search.BaseSearchQuery
          extended by oracle.security.jps.service.policystore.search.RoleCategorySearchQuery


public class RoleCategorySearchQuery
extends BaseSearchQuery

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

RoleCategorySearchQuery

public RoleCategorySearchQuery()
No arg constructor

Method Detail

addQuery

public void addQuery(RoleCategorySearchQuery.SEARCH_PROPERTY property,
                     boolean negation,
                     ComparatorType operator,
                     java.lang.String value,
                     SearchQuery.MATCHER match)
Add a RoleCategorySearchQuery to this RoleCategorySearchQuery. This is the only way to add query requirments to RoleCategorySearchQuery object
Parameters:
property - -- search property
negation - - negate the search?
operator - -- Type of comparison
value - -- value to search for
match - -- matching to be performed.

addQuery

public void addQuery(RoleCategorySearchQuery query)
Add a preconfigured RoleCategorySearchQuery
Parameters:
query - -- query to be added.

getSearchByProperty

public RoleCategorySearchQuery.SEARCH_PROPERTY getSearchByProperty()
Get the search property to use in the search.
Returns:
SEARCH_PROPERTY ojbect if this query does not have any other queries added otherwise null.

getSearchQueryInOrder

public RoleCategorySearchQuery[] getSearchQueryInOrder()
Get all added queries in the order they were added.
Returns:
Array of RoleCategorySearchQuery objects

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-03


Copyright © 2010, Oracle. All rights reserved.