Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 1 (11.1.1)

E22649-02 ESAPI


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

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


public class AttributeSearchQuery
extends BaseSearchQuery

A Class to build search criteria to query Attribute definition

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

  AttributeSearchQuery query = new AttributeSearchQuery( AttributeSearchQuery.SEARCH_PROPERTY.NAME,
    false, ComparatorType.EQUALITY, "attr_1", BaseSearchQuery.MATCHER.EXACT);
 getAdminRoles ( query );
 

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

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

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

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

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

Nested Class Summary
static class AttributeSearchQuery.SEARCH_PROPERTY
          search property for attribute

 

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

 

Constructor Summary
AttributeSearchQuery()
           
AttributeSearchQuery(AttributeSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.Object valueObject, SearchQuery.MATCHER match)
          constructor for simple search query with object as search by value
AttributeSearchQuery(AttributeSearchQuery.SEARCH_PROPERTY property, boolean negation, ComparatorType operator, java.lang.String value, SearchQuery.MATCHER match)
          constructor for simple search query with String as search by value
AttributeSearchQuery(java.util.List<AttributeSearchQuery> childQueries, boolean negation, boolean isORMatch)
          constructor for complex search query

 

Method Summary
 AttributeSearchQuery.SEARCH_PROPERTY getSearchByProperty()
          get the search by property in this search query
 AttributeSearchQuery[] getSearchQueryInOrder()
          Get 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

AttributeSearchQuery

public AttributeSearchQuery()

AttributeSearchQuery

public AttributeSearchQuery(java.util.List<AttributeSearchQuery> childQueries,
                            boolean negation,
                            boolean isORMatch)
constructor for complex search query
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'

AttributeSearchQuery

public AttributeSearchQuery(AttributeSearchQuery.SEARCH_PROPERTY property,
                            boolean negation,
                            ComparatorType operator,
                            java.lang.String value,
                            SearchQuery.MATCHER match)
constructor for simple search query with String as search by value
Parameters:
property - the property to search by, See AttributeSearchQuery.SEARCH_PROPERTY for list of valid values
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.

AttributeSearchQuery

public AttributeSearchQuery(AttributeSearchQuery.SEARCH_PROPERTY property,
                            boolean negation,
                            ComparatorType operator,
                            java.lang.Object valueObject,
                            SearchQuery.MATCHER match)
constructor for simple search query with object as search by value
Parameters:
property - the property to search by, See AttributeSearchQuery.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.

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.

Method Detail

getSearchByProperty

public AttributeSearchQuery.SEARCH_PROPERTY getSearchByProperty()
get the search by property in this search query
Returns:
null if this is a complex search query

getSearchQueryInOrder

public AttributeSearchQuery[] getSearchQueryInOrder()
Get 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 1 (11.1.1)

E22649-02 ESAPI


Copyright © 2011, Oracle. All rights reserved.