Class SearchCriteria

java.lang.Object
oracle.iam.platform.entitymgr.vo.SearchCriteria
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SearchRule

public class SearchCriteria extends Object implements Serializable
Class that can be used to construct criteria when searching for entities.
Author:
Thomas Cheong
See Also:
  • Constructor Details

    • SearchCriteria

      public SearchCriteria(Object arg1, 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 Details

    • getOperator

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

      public 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 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 String toString()
      Overrides:
      toString in class Object