com.ibm.itim.dataservices.model

Class SearchParameters

  • java.lang.Object
    • com.ibm.itim.dataservices.model.SearchParameters
  • All Implemented Interfaces:
    java.io.Serializable


    public class SearchParameters
    extends java.lang.Object
    implements java.io.Serializable
    Class that holds a set of parameters that can be used to further define how a search should be implemented against the data store. Parameters such as scope, attributes to search for, and search limits can be controlled through this object.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ASCENDING
      Constant used in setSearchOrder and getSearchOrder to indicate an ascending search.
      static int DESCENDING
      Constant used in setSearchOrder and getSearchOrder to indicate a descending search.
      static int ONELEVEL_SCOPE
      Constant indicating a single level search scope.
      static int SUBTREE_SCOPE
      Constant indicating a sub-tree search scope.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Collection getAttributes()
      Returns the attributes to return in the search.
      boolean getLazySearch()
      Returns a hint to the back-end search implementation that searches should use lazy, un-sorted search techniques when available.
      java.util.Locale getLocale()
      Get the locale used for this search
      int getPageSize()
      Get the page size for paged searches
      int getScope()
      Returns the scope of the search.
      long getSizeLimit()
      Returns the maximum number of entries to be returned.
      java.lang.String getSortAttribute()
      Get the sorting attribute
      int getSortOrder()
      Get the sort order.
      boolean isRawSearch()
      Returns true if raw search is used.
      void setAttributes(java.util.Collection attributes)
      Changes the list of attributes to return in the search.
      void setLazySearch(boolean flag)
      Provides a hint to the back-end search implementation that searches should use lazy, un-sorted search techniques when available.
      void setLocale(java.util.Locale locale)
      Set the locale to be used for local-specific collation of search results
      void setPageSize(int pageSize)
      Set the page size for paged searches
      void setRawSearch(boolean flag)
      Set flag to true if you don't want to append objectclass=erpersonitem and objectclass=erbppersonitem to the filter.
      void setScope(int scope)
      Changes the scope of the search.
      void setSizeLimit(long sizeLimit)
      Change the maximum number of entries to be returned.
      void setSortAttribute(java.lang.String sortAttribute)
      Set the sorting attribute
      void setSortOrder(int order)
      Set the sort order
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ONELEVEL_SCOPE

        public static int ONELEVEL_SCOPE
        Constant indicating a single level search scope.
      • SUBTREE_SCOPE

        public static int SUBTREE_SCOPE
        Constant indicating a sub-tree search scope. This scope will result in all sub nodes beneath the search base being searched.
      • ASCENDING

        public static final int ASCENDING
        Constant used in setSearchOrder and getSearchOrder to indicate an ascending search.
        See Also:
        Constant Field Values
      • DESCENDING

        public static final int DESCENDING
        Constant used in setSearchOrder and getSearchOrder to indicate a descending search.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SearchParameters

        public SearchParameters()
        Default constructor. ONELEVEL_SCOPE is the default scope. There is no limit to the number of entries returned by default and all attributes will be returned. The sort order defaults to ASCENDING and the page size defaults to 0 indicating no page size limit.
      • SearchParameters

        public SearchParameters(SearchParameters params)
        Constructs a copy of the provided search parameters.
        Parameters:
        params - SearchParameters to copy.
    • Method Detail

      • getSizeLimit

        public long getSizeLimit()
        Returns the maximum number of entries to be returned.
        Returns:
        Maximum number of entries.
      • setSizeLimit

        public void setSizeLimit(long sizeLimit)
        Change the maximum number of entries to be returned.
        Parameters:
        sizeLimit - Maximum number of entries.
      • getScope

        public int getScope()
        Returns the scope of the search.
        Returns:
        Enumeration of the scope, ONELEVEL_SCOPE, SUBTREE_SCOPE.
      • setScope

        public void setScope(int scope)
        Changes the scope of the search.
        Parameters:
        scope - Enumeration of the scope, ONELEVEL_SCOPE, SUBTREE_SCOPE.
      • getAttributes

        public java.util.Collection getAttributes()
        Returns the attributes to return in the search. An empty list indicates all attributes will be returned.
        Returns:
        Collection of attribute names (Strings).
      • setAttributes

        public void setAttributes(java.util.Collection attributes)
        Changes the list of attributes to return in the search. An empty list indicates all attributes will be returned.
        Parameters:
        attributes - Collection of attribute names (Strings).
      • getSortAttribute

        public java.lang.String getSortAttribute()
        Get the sorting attribute
        Returns:
        The name of the attribute to sort the result set on
      • setSortAttribute

        public void setSortAttribute(java.lang.String sortAttribute)
        Set the sorting attribute
        Parameters:
        sortAttribute - The name of the attribute to sort the result set on.
      • getSortOrder

        public int getSortOrder()
        Get the sort order.
        Returns:
        The sort order. This will be one of SearchParameters.ASCENDING or SearchParameters.DESCENDING
      • setSortOrder

        public void setSortOrder(int order)
        Set the sort order
        Parameters:
        order - The order of the sort, must be one of ASCENDING or DESCENDING.
      • getLocale

        public java.util.Locale getLocale()
        Get the locale used for this search
        Returns:
        The locale used in any local-specific collation of search results
      • setLocale

        public void setLocale(java.util.Locale locale)
        Set the locale to be used for local-specific collation of search results
        Parameters:
        locale - The locale for the search
      • getPageSize

        public int getPageSize()
        Get the page size for paged searches
        Returns:
        The page size set for paged searches.
      • setPageSize

        public void setPageSize(int pageSize)
        Set the page size for paged searches
        Parameters:
        pageSize - The size for paged searches. A zero indicates no page size limit. This parameter is honoured only by data sources that can provide results in pages and is ignored otherwise.
      • isRawSearch

        public boolean isRawSearch()
        Returns true if raw search is used. When raw search is used, objectclass=erpersonitem and objectclass=erbppersonitem is not appended to the filter.
      • setRawSearch

        public void setRawSearch(boolean flag)
        Set flag to true if you don't want to append objectclass=erpersonitem and objectclass=erbppersonitem to the filter.
      • setLazySearch

        public void setLazySearch(boolean flag)
        Provides a hint to the back-end search implementation that searches should use lazy, un-sorted search techniques when available. This is intended to be used on searches that are anticipated to be extermely large, and should be used with care, as setting too many could over run the resource constraints on the LDAP server.
      • getLazySearch

        public boolean getLazySearch()
        Returns a hint to the back-end search implementation that searches should use lazy, un-sorted search techniques when available.