Skip navigation links

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

E27155-03


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

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


public class ApplicationPolicySearchQuery
extends BaseSearchQuery

A Class to build search criteria to query Application Policies.

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

  ApplicationPolicySearchQuery query = new ApplicationPolicySearchQuery( ApplicationPolicySearchQuery.SEARCH_PROPERTY.NAME,
    false, ComparatorType.EQUALITY, "application_1", BaseSearchQuery.MATCHER.EXACT);
  getApplicationPolicies( query );
 

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

Consider the following example to search Application policy with name begins with 'a' and name ends with '1'. Obviously, the two criteria (below) have to be AND-ed.

  List<ApplicationPolicySearchQuery> list = new ArrayList<ApplicationPolicySearchQuery>();
  list.add(new ApplicationPolicySearchQuery( ApplicationPolicySearchQuery.SEARCH_PROPERTY.NAME,
    false, ComparatorType.EQUALITY, "a", BaseSearchQuery.MATCHER.BEGINS_WITH));
  
  list.add(new ApplicationPolicySearchQuery( ApplicationPolicySearchQuery.SEARCH_PROPERTY.NAME,
    false, ComparatorType.EQUALITY, "1", BaseSearchQuery.MATCHER.ENDS_WITH));
 
  ApplicationPolicySearchQuery query = new ApplicationPolicySearchQuery(list, false, false);
 

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

  List<ApplicationPolicySearchQuery> list = new ArrayList<ApplicationPolicySearchQuery>();
  list.add(new ApplicationPolicySearchQuery( ApplicationPolicySearchQuery.SEARCH_PROPERTY.NAME,
    false, ComparatorType.EQUALITY, "a", BaseSearchQuery.MATCHER.BEGINS_WITH));
  
  list.add(new ApplicationPolicySearchQuery( ApplicationPolicySearchQuery.SEARCH_PROPERTY.NAME,
    false, ComparatorType.EQUALITY, "1", BaseSearchQuery.MATCHER.ENDS_WITH));
 
  ApplicationPolicySearchQuery query = new ApplicationPolicySearchQuery(list, false, false);
 

Nested Class Summary
static class ApplicationPolicySearchQuery.SEARCH_PROPERTY
           

 

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

 

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

 

Method Summary
 ApplicationPolicySearchQuery.SEARCH_PROPERTY getSearchByProperty()
          Get the search property to use in the search.
 ApplicationPolicySearchQuery[] getSearchQueryInOrder()
          Get all added queries in the order they were added.

 

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, getPageInfo, getPreparedQueryId, getSearchByPropertyString, getSearchByValue, getSearchByValueObject, getSearchComparator, getSearchQueries, getSearchValueMatch, hasPageInfo, isANDMatch, isComplexQuery, isNegativeMatch, isORMatch, setPageInfo, setPreparedQueryId, unsetPageInfo

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ApplicationPolicySearchQuery

public ApplicationPolicySearchQuery(ApplicationPolicySearchQuery.SEARCH_PROPERTY property,
                                    boolean negation,
                                    ComparatorType operator,
                                    java.lang.String value,
                                    SearchQuery.MATCHER match)
Constructor
Parameters:
property - the property to search by
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.

ApplicationPolicySearchQuery

public ApplicationPolicySearchQuery(java.util.List<ApplicationPolicySearchQuery> 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 ApplicationPolicySearchQuery.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 ApplicationPolicySearchQuery[] getSearchQueryInOrder()
Get all added queries in the order they were added.
Returns:
Array of ResourceSearchQuery objects

Skip navigation links

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

E27155-03


Copyright © 2011, 2013 Oracle. All rights reserved.