Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


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

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


public class AppRoleSearchQuery
extends BaseSearchQuery

A Class to build search criterias to query AppRoles.

Following code snippet illustrates how to build a search criteria to search by the DisplayName

  AppRoleSearchQuery query = new AppRoleSearchQuery( AppRoleSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
    false, ComparatorType.EQUALITY, "DisplayName Value to searchBy", BaseSearchQuery.MATCHER.EXACT);
 getAppRoles ( query );
 

To build more complex search criterias, use the Constructor for complex search query.

Consider the following example to search AppRoles by a specific description and display name. Obviously, the two criterias (below) have to be AND-ed.

  List<AppRoleSearchQuery> list = new ArrayList<AppRoleSearchQuery>();
  list.add(new AppRoleSearchQuery( AppRoleSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
    false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT));
  
  list.add(new AppRoleSearchQuery( AppRoleSearchQuery.SEARCH_PROPERTY.DESCRIPTION,
    false, ComparatorType.EQUALITY, "The Description", BaseSearchQuery.MATCHER.EXACT));
 
  AppRoleSearchQuery query = new AppRoleSearchQuery(list, false, false);
 

Similarly, we can have two criterias OR-ed as below.

  List<AppRoleSearchQuery> list = new ArrayList<AppRoleSearchQuery>();
  list.add(new AppRoleSearchQuery( AppRoleSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME,
    false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT));
  
  list.add(new AppRoleSearchQuery( AppRoleSearchQuery.SEARCH_PROPERTY.DESCRIPTION,
    false, ComparatorType.EQUALITY, "The Description", BaseSearchQuery.MATCHER.EXACT));
 
  AppRoleSearchQuery query = new AppRoleSearchQuery(list, false, true);
 

Nested Class Summary
static class AppRoleSearchQuery.SEARCH_PROPERTY
          Criterias to search AppRoles By

 

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

 

Constructor Summary
AppRoleSearchQuery(AppRoleSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.Object valueObject, SearchQuery.MATCHER match)
          Constructor
AppRoleSearchQuery(AppRoleSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match)
          Constructor
AppRoleSearchQuery(java.util.List<AppRoleSearchQuery> queries, boolean negation, boolean isORMatch)
          Constructor

 

Method Summary
 AppRoleSearchQuery.SEARCH_PROPERTY getSearchByProperty()
          Gets the search by property in this search query
 AppRoleSearchQuery[] getSearchQueryInOrder()
          Gets the child search query in this search query.

 

Methods inherited from class oracle.security.jps.service.policystore.search.BaseSearchQuery
getComparator, getQueries, toString

 

Methods inherited from class oracle.security.jps.search.SearchQuery
addBaseQuery, getBaseSearchQueryInOrder, 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

AppRoleSearchQuery

public AppRoleSearchQuery(AppRoleSearchQuery.SEARCH_PROPERTY property,
                          boolean negation,
                          ComparatorType operator,
                          java.lang.String value,
                          SearchQuery.MATCHER match)
Constructor
Parameters:
property - the property to search by, See AppRoleSearchQuery.SEARCH_PROPERTY for list of valid values. SEARCH_PROPERTY.PRINCIPAL is not supported with String type value.
negation - if true, then the NOT operator is applied
operator - the operator to apply
value - the value to search for

If value is null, the match must be ANY

If value is non-null, this value is matched against the values to search for. The match algorithm is applied to values to sarch against.

match - how the value should match-ed with the values to search against. If match is null, an EXACT match is assumed. value should be non-null.

AppRoleSearchQuery

public AppRoleSearchQuery(AppRoleSearchQuery.SEARCH_PROPERTY property,
                          boolean negation,
                          ComparatorType operator,
                          java.lang.Object valueObject,
                          SearchQuery.MATCHER match)
Constructor
Parameters:
property - the property to search by, See AppRoleSearchQuery.SEARCH_PROPERTY for list of valid values.
negation - if true, then the NOT operator is applied
operator - the operator to apply
valueObject - the value to search for

If value is null, the match must be ANY

If value is non-null, this value is matched against the values to search for. The match algorithm is applied to values to sarch against.

If property is SEARCH_PROPERTY.PRINCIPAL, valueObject should be Principal or PrincipalEntry instance

match - how the value should match-ed with the values to search against. If match is null, an EXACT match is assumed. value should be non-null.

AppRoleSearchQuery

public AppRoleSearchQuery(java.util.List<AppRoleSearchQuery> queries,
                          boolean negation,
                          boolean isORMatch)
Constructor
Parameters:
queries - child queries of this query
negation - if true, then the NOT operator is applied.
isORMatch - if true the syntax among the child queries is 'OR', if false, the syntax among child queries is 'AND'

Method Detail

getSearchByProperty

public AppRoleSearchQuery.SEARCH_PROPERTY getSearchByProperty()
Gets the search by property in this search query
Returns:

getSearchQueryInOrder

public AppRoleSearchQuery[] getSearchQueryInOrder()
Gets the child search query in this search query. Return child queries for a complex query, return empty arry for a simple query
Returns:

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


Copyright © 2011,2012, Oracle and/or its affiliates. All rights reserved.