Package com.xebialabs.deployit.plugin.api.services

## Class SearchParameters

- java.lang.Object
- - com.xebialabs.deployit.plugin.api.services.SearchParameters

-     public class SearchParameters
      extends java.lang.Object

  Declarative query parameters for searching the JCR repository for Configuration Items.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SearchParameters()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SearchParameters` | `addProperty​(java.lang.String property, java.lang.String value)` | Search for the value of a property.
    `java.util.Calendar` | `getAfter()` |
    `java.lang.String` | `getAncestor()` |
    `java.util.Calendar` | `getBefore()` |
    `int` | `getDepth()` |
    `java.lang.String` | `getId()` |
    `java.lang.String` | `getName()` |
    `long` | `getPage()` |
    `java.lang.String` | `getParent()` |
    `java.util.Map<java.lang.String,​java.lang.String>` | `getProperties()` |
    `long` | `getResultsPerPage()` |
    `Type` | `getType()` |
    `boolean` | `isExactIdSearch()` |
    `boolean` | `isExactNameSearch()` |
    `void` | `setAfter​(java.util.Calendar after)` | Sets the search parameters to search for CIs modified after the given date.
    `SearchParameters` | `setAncestor​(java.lang.String ancestor)` | The desired ancestor of the CI.
    `void` | `setBefore​(java.util.Calendar before)` | Sets the search parameters to search for CIs modified before the given date.
    `SearchParameters` | `setDepth​(int depth)` | Set the depth of the search.
    `SearchParameters` | `setExactIdSearch​(boolean exactIdSearch)` | Set to true for exact id search, default is false.
    `SearchParameters` | `setExactNameSearch​(boolean isExactNameSearch)` | Set to true for exact name search, default is false.
    `SearchParameters` | `setId​(java.lang.String id)` | A search pattern for the id.
    `SearchParameters` | `setName​(java.lang.String name)` | A search pattern for the name.
    `SearchParameters` | `setPage​(long page)` | Sets the page to be retrieved.
    `SearchParameters` | `setParent​(java.lang.String parent)` | The desired parent of the CI.
    `SearchParameters` | `setResultsPerPage​(long nrOfResults)` | Sets the number of results to be retrieved per page.
    `SearchParameters` | `setType​(Type type)` | The desired type of the CI.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SearchParameters

          public SearchParameters()

  - ### Method Detail

    - #### setType

          public SearchParameters setType​(Type type)

      The desired type of the CI.

    - #### 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`