Class SearchParameters


  • public class SearchParameters
    extends java.lang.Object
    Declarative query parameters for searching the JCR repository for Configuration Items.
    • Constructor Detail

      • SearchParameters

        public SearchParameters()
    • Method Detail

      • addProperty

        public SearchParameters addProperty​(java.lang.String property,
                                            java.lang.String value)
        Search for the value of a property. This may be a property of type String or Enum. A type is required to be able to use this filter.
      • setParent

        public SearchParameters setParent​(java.lang.String parent)
        The desired parent of the CI.
      • setAncestor

        public SearchParameters setAncestor​(java.lang.String ancestor)
        The desired ancestor of the CI.
      • setName

        public SearchParameters setName​(java.lang.String name)
        A search pattern for the name. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character.
      • setId

        public SearchParameters setId​(java.lang.String id)
        A search pattern for the id. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character.
      • setBefore

        public void setBefore​(java.util.Calendar before)
        Sets the search parameters to search for CIs modified before the given date.
      • setAfter

        public void setAfter​(java.util.Calendar after)
        Sets the search parameters to search for CIs modified after the given date.
      • setPage

        public SearchParameters setPage​(long page)
        Sets the page to be retrieved.
      • setResultsPerPage

        public SearchParameters setResultsPerPage​(long nrOfResults)
        Sets the number of results to be retrieved per page.
      • setDepth

        public SearchParameters setDepth​(int depth)
        Set the depth of the search. By default it searches the full depth of the tree.
      • setExactNameSearch

        public SearchParameters setExactNameSearch​(boolean isExactNameSearch)
        Set to true for exact name search, default is false.
      • setExactIdSearch

        public SearchParameters setExactIdSearch​(boolean exactIdSearch)
        Set to true for exact id search, default is false.
      • getType

        public Type getType()
        Returns:
        The CI type.
      • getParent

        public java.lang.String getParent()
        Returns:
        The CI parent id.
      • getAncestor

        public java.lang.String getAncestor()
        Returns:
        The CI ancestor id.
      • getName

        public java.lang.String getName()
        Returns:
        The CI name.
      • getId

        public java.lang.String getId()
        Returns:
        The CI id.
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
      • getBefore

        public java.util.Calendar getBefore()
        Returns:
        The specified date for CIs modified before this date.
      • getAfter

        public java.util.Calendar getAfter()
        Returns:
        The specified date for CIs modified after this date.
      • getPage

        public long getPage()
        Returns:
        The retrieved page.
      • getResultsPerPage

        public long getResultsPerPage()
        Returns:
        The number of results retrieved per page.
      • getDepth

        public int getDepth()
        Returns:
        The depth of the search. Default is full depth.
      • isExactNameSearch

        public boolean isExactNameSearch()
        Returns:
        true for exactNameSearch
      • isExactIdSearch

        public boolean isExactIdSearch()
        Returns:
        true for exactIdSearch
      • toString

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