Skip navigation links


oracle.iam.platform.entitymgr.vo
Class SearchCriteria

java.lang.Object
  extended by oracle.iam.platform.entitymgr.vo.SearchCriteria

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SearchRule

public class SearchCriteria
extends java.lang.Object
implements java.io.Serializable

Class that can be used to construct criteria when searching for entities.

See Also:
Serialized Form

Nested Class Summary
static class SearchCriteria.Argument
           
static class SearchCriteria.Operator
          Operators that are available for constructing the search criteria

 

Constructor Summary
SearchCriteria(java.lang.Object arg1, java.lang.Object arg2, SearchCriteria.Operator operator)
          Construct a search criteria

 

Method Summary
 java.lang.Object getFirstArgument()
          Returns the first argument value in the criteria.
 SearchCriteria.Operator getOperator()
          Returns the operator used in the search criteria
 java.lang.Object getSecondArgument()
          Returns the second argument value in the criteria.
 java.lang.String toString()
           

 

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

 

Constructor Detail

SearchCriteria

public SearchCriteria(java.lang.Object arg1,
                      java.lang.Object arg2,
                      SearchCriteria.Operator operator)
Construct a search criteria
Parameters:
arg1 - a string object containing the name of the attribute to search on or an object of type SearchCriteria
arg2 - a string object containing the value of the attribute to search with or an object of type SearchCriteria
operator - One of the values from Operator enum

Below is the code snippet that shows how to construct SearchCriteria where you want to search for 3 users by their login. Lets assume their login values are user1, user2 and user3

 SearchCriteria criteria, criteria1, criteria2, criteria3;
               
               criteria1 = new SearchCriteria("User Login", "user1",
               SearchCriteria.Operator.EQUAL);

               criteria2 = new SearchCriteria("User Login", "user2",
                               SearchCriteria.Operator.EQUAL);

               criteria3 = new SearchCriteria("User Login", "user3",
                               SearchCriteria.Operator.EQUAL);

               criteria = new SearchCriteria(criteria1, criteria2, Operator.OR);
               criteria = new SearchCriteria(criteria, criteria3, Operator.OR);
 
 
 
...

Method Detail

getOperator

public SearchCriteria.Operator getOperator()
Returns the operator used in the search criteria
Returns:

getFirstArgument

public java.lang.Object getFirstArgument()
Returns the first argument value in the criteria. It could be an attribute name or an object of type SearchCriteria
Returns:

getSecondArgument

public java.lang.Object getSecondArgument()
Returns the second argument value in the criteria. It could be an attribute value or an object of type SearchCriteria
Returns:

toString

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

Skip navigation links


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