Skip navigation links

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

E14650-01


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

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

Direct Known Subclasses:
PermissionSetSearchQuery, ResourceSearchQuery, ResourceTypeSearchQuery

public class BaseSearchQuery
extends java.lang.Object

A class to construct generic Search Queries to aid with retrieving information from a persistent store.

The search query comprises

  1. EntryContext - of an entity to to search for
  2. property - the property to search by
  3. apply Negative operator - specificies if the property match should be negated.
  4. searchValue - the value of the property to match
  5. a match algorithm - dictates how the searchValue should match the searchValue in the persisted entity.

Further, a search query can be AND-ed, OR-ed with other queries to build a specific search criteria. The query objects are not thread-safe and concurrent modifications to the query is not allowed.


Nested Class Summary
static class BaseSearchQuery.MATCHER
          Rules to match two Strings.

 

Field Summary
 java.util.ArrayList<BaseSearchQuery> queries
           

 

Constructor Summary
BaseSearchQuery(EntryReference.EntryType context)
          Constructs a BaseQuery.
BaseSearchQuery(EntryReference.EntryType context, java.lang.String property, boolean negation, ComparatorType operator, java.lang.Object objectValue)
           
BaseSearchQuery(EntryReference.EntryType context, java.lang.String property, boolean negation, ComparatorType operator, java.lang.Object objectValue, BaseSearchQuery.MATCHER matcher)
           
BaseSearchQuery(EntryReference.EntryType context, java.lang.String property, boolean negation, ComparatorType operator, java.lang.String value, BaseSearchQuery.MATCHER matcher)
          Constructs a Base query.

 

Method Summary
 void addBaseQuery(BaseSearchQuery query)
          Add a BaseSearchQuery
 BaseSearchQuery[] getBaseSearchQueryInOrder()
          Get the base search queries in order.
 ComparatorType getComparator()
           
 EntryReference.EntryType getEntityType()
           
 java.util.ArrayList<BaseSearchQuery> getQueries()
          Get the Queries.
 java.lang.String getSearchByPropertyString()
          Get The Search by Property as a String.
 java.lang.String getSearchByValue()
          Get the Search by Value.
<T> T
getSearchByValueObject(java.lang.Class<T> klass)
          Get the search by value as
 BaseSearchQuery.MATCHER getSearchValueMatch()
           
 boolean isANDMatch()
           
 boolean isNegativeMatch()
           
 boolean isORMatch()
           
 void setANDMatch()
          Apply the AND condition to all sub-queries in this query.
 void setORMatch()
          Apply the OR condition to all sub-queries in this query.

 

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

 

Field Detail

queries

public final java.util.ArrayList<BaseSearchQuery> queries

Constructor Detail

BaseSearchQuery

public BaseSearchQuery(EntryReference.EntryType context)
Constructs a BaseQuery.
Parameters:
context - The entity being searched for.

BaseSearchQuery

public BaseSearchQuery(EntryReference.EntryType context,
                       java.lang.String property,
                       boolean negation,
                       ComparatorType operator,
                       java.lang.String value,
                       BaseSearchQuery.MATCHER matcher)
Constructs a Base query.
Parameters:
context - The entity to search for
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.

BaseSearchQuery

public BaseSearchQuery(EntryReference.EntryType context,
                       java.lang.String property,
                       boolean negation,
                       ComparatorType operator,
                       java.lang.Object objectValue)

BaseSearchQuery

public BaseSearchQuery(EntryReference.EntryType context,
                       java.lang.String property,
                       boolean negation,
                       ComparatorType operator,
                       java.lang.Object objectValue,
                       BaseSearchQuery.MATCHER matcher)

Method Detail

getQueries

public java.util.ArrayList<BaseSearchQuery> getQueries()
Get the Queries.
Returns:
list of queries.

addBaseQuery

public void addBaseQuery(BaseSearchQuery query)
Add a BaseSearchQuery
Parameters:
query - to add a a sub-query.

getBaseSearchQueryInOrder

public BaseSearchQuery[] getBaseSearchQueryInOrder()
Get the base search queries in order.
Parameters:
array - of base search queries.
Returns:
array of base search queries

getSearchByPropertyString

public java.lang.String getSearchByPropertyString()
Get The Search by Property as a String.
Returns:
string property.

getSearchByValue

public java.lang.String getSearchByValue()
Get the Search by Value.
Returns:
value

getSearchByValueObject

public <T> T getSearchByValueObject(java.lang.Class<T> klass)
Get the search by value as

setORMatch

public final void setORMatch()
Apply the OR condition to all sub-queries in this query.

setANDMatch

public final void setANDMatch()
Apply the AND condition to all sub-queries in this query.

isORMatch

public final boolean isORMatch()
Returns:
true if this an OR condition, false otherwise

isANDMatch

public final boolean isANDMatch()
Returns:
true if this is an AND condition, false otherwise.

isNegativeMatch

public final boolean isNegativeMatch()
Returns:
true if the query should be negated.

getSearchValueMatch

public final BaseSearchQuery.MATCHER getSearchValueMatch()
Returns:
the MATCHER to apply to the search value.

getComparator

public final ComparatorType getComparator()
Returns:
the comparator to apply.

getEntityType

public final EntryReference.EntryType getEntityType()
Returns:
the entity to search for

Skip navigation links

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

E14650-01


Copyright © 2009, Oracle. All rights reserved.