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 ResourceTypeSearchQuery

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.ResourceTypeSearchQuery


public class ResourceTypeSearchQuery
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

  ResourceTypeSearchQuery query = new ResourceTypeSearchQuery();
  query.addQuery ( ResourceTypeSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
    false, ComparatorType.EQUALITY, "DisplayName Value to searchBy", ResourceTypeSearchQuery.MATCHER.EXACT);
 getResourceTypes ( query );
 

To build more complex search criterias, use the addQuery to add more search criterias.

Consider the following example to search Resource types 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.

  ResourceTypeSearchQuery query = new ResourceTypeSearchQuery();
  query.addQuery ( ResourceTypeSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
    false, ComparatorType.EQUALITY, "The display name value", ResourceTypeSearchQuery.MATCHER.EXACT);

  query.addQuery ( ResourceTypeSearchQuery.SEARCH_PROPERTY.DESCRIPTION,
    false, ComparatorType.EQUALITY, "The resource description value", ResourceTypeSearchQuery.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)

  ResourceTypeSearchQuery query = new ResourceTypeSearchQuery();
  query.addQuery ( ResourceTypeSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
    false, ComparatorType.EQUALITY, "The display name value", ResourceTypeSearchQuery.MATCHER.EXACT);

  query.addQuery ( ResourceTypeSearchQuery.SEARCH_PROPERTY.DESCRIPTION,
    false, ComparatorType.EQUALITY, "The resource description value", ResourceTypeSearchQuery.MATCHER.EXACT);

  query.setORMatch();
 

Nested Class Summary
static class ResourceTypeSearchQuery.SEARCH_PROPERTY
          Properties to search a resource type by.

 

Nested classes/interfaces inherited from class oracle.security.jps.search.SearchQuery
SearchQuery.MATCHER

 

Constructor Summary
ResourceTypeSearchQuery()
           

 

Method Summary
 void addQuery(ResourceTypeSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match)
           
 void addQuery(ResourceTypeSearchQuery query)
           
 ResourceTypeSearchQuery.SEARCH_PROPERTY getSearchByProperty()
           
 ResourceTypeSearchQuery[] getSearchQueryInOrder()
           

 

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

ResourceTypeSearchQuery

public ResourceTypeSearchQuery()

Method Detail

addQuery

public void addQuery(ResourceTypeSearchQuery.SEARCH_PROPERTY property,
                     boolean negation,
                     ComparatorType operator,
                     java.lang.String value,
                     SearchQuery.MATCHER match)

addQuery

public void addQuery(ResourceTypeSearchQuery query)

getSearchByProperty

public ResourceTypeSearchQuery.SEARCH_PROPERTY getSearchByProperty()

getSearchQueryInOrder

public ResourceTypeSearchQuery[] getSearchQueryInOrder()

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.