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 ChangeLogSearchQuery

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


public class ChangeLogSearchQuery
extends BaseSearchQuery

A Class to build search criteria for obtaining incremental changes to policy store based on CREATE/MODIFY/DELETE time stamps. <p/> <p/>

Following code snippet illustrates how to build a search query
1. Create a search query with create time stamp.
String timeStamp; // obtain the time stamp using getLastModifiedTimeStamp API
ChangeLogSearchQuery q1 = new ChangeLogSearchQuery(ChangeLogSearchQuery.SEARCH_PROPERTY.CREATE_TIME_STAMP, timeStamp);

2. Create a search query with modify time stamp.
String timeStamp; // obtain the time stamp using getLastModifiedTimeStamp API
ChangeLogSearchQuery q2 = new ChangeLogSearchQuery(ChangeLogSearchQuery.SEARCH_PROPERTY.MODIFY_TIME_STAMP, timeStamp);

3. Create a search query with create and modify time stamp.
// create queries q1 and q2 (with appropriate time stamps)
List<ChangeLogSearchQuery> queries = new ArrayList<ChangeLogSearchQuery>();
queries.add(q1);
queries.add(q2);
ChangeLogSearchQuery q = new ChangeLogSearchQuery(queries, false, false);

Query q is a composite query with both create and modify time stamp criteria added. Such a query should be used if
both (added and modified) changes are required.
4. Create a search query with delete time stamp.
String timeStamp; // obtain the time stamp using getLastModifiedTimeStamp API
ChangeLogSearchQuery q = new ChangeLogSearchQuery(ChangeLogSearchQuery.SEARCH_PROPERTY.DELETE_TIME_STAMP, timeStamp);


Nested Class Summary
static class ChangeLogSearchQuery.SEARCH_PROPERTY
          Time stamp criterias to search changes by

 

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

 

Constructor Summary
ChangeLogSearchQuery(ChangeLogSearchQuery.SEARCH_PROPERTY property, java.lang.String value)
          Constructor
Construct a simple query with timestamp property and a time stamp value
ChangeLogSearchQuery(java.util.List queries, boolean negation, boolean isORMatch)
          Constructor
Construct a composite query with multiple queries supplied in a list.

 

Method Summary
 boolean equals(java.lang.Object another)
           
 java.lang.String getQueryTimeStamp(ChangeLogSearchQuery.SEARCH_PROPERTY property)
          Gets the time stamp value for the search property from this query.
 ChangeLogSearchQuery.SEARCH_PROPERTY getSearchByProperty()
          Gets the search by property in this search query
 java.lang.String toString()
           

 

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

 

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
getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ChangeLogSearchQuery

public ChangeLogSearchQuery(ChangeLogSearchQuery.SEARCH_PROPERTY property,
                            java.lang.String value)
Constructor
Construct a simple query with timestamp property and a time stamp value
Parameters:
property - search property to search by (create time stamp or modify time stamp)
value - String value of the time stamp.

ChangeLogSearchQuery

public ChangeLogSearchQuery(java.util.List queries,
                            boolean negation,
                            boolean isORMatch)
Constructor
Construct a composite query with multiple queries supplied in a list. If multiple CREATE/MODIFY stamps are given, then this constructor will overwrite all values with the last one (supplied by the underlying list implementation).
Parameters:
queries - child queries of this query( maximum of two queries are allowed -- for create and modify time stamps)
negation - if true, then the NOT operator is applied.
isORMatch - if true, then the syntax among child queries is 'OR', if false the syntax among child queries is 'AND'

Method Detail

getQueryTimeStamp

public java.lang.String getQueryTimeStamp(ChangeLogSearchQuery.SEARCH_PROPERTY property)
Gets the time stamp value for the search property from this query.
Parameters:
property - the search property
Returns:
timestamp corresponding to the search property, if supplied to the constructor, otherwise an empty string.

getSearchByProperty

public ChangeLogSearchQuery.SEARCH_PROPERTY getSearchByProperty()
Gets the search by property in this search query
Returns:
Search property by which to search by

toString

public java.lang.String toString()
Overrides:
toString in class BaseSearchQuery

equals

public boolean equals(java.lang.Object another)
Overrides:
equals in class java.lang.Object

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.