Interface SearchClient<ItemType>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean exists​(com.lexmark.saperion.search.expression.Expression filter)
      This convenience method checks whether an element matching the filter actually exists.
      java.lang.Iterable<ItemType> list()
      This method returns an iterable over the complete result of the search using the default paging.
      java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.expression.Expression filter)
      This method returns an iterable over the filtered result of the search using the default paging.
      java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.expression.Expression filter, com.lexmark.saperion.search.PageDefinition paging)
      This method returns an iterable over the filtered result of the search paging as defined.
      java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.expression.Expression filter, java.util.List<com.lexmark.saperion.search.query.FieldOrderDescriptor> order, com.lexmark.saperion.search.PageDefinition paging)
      This method returns an iterable over the filtered result of the search paging as defined.
      java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.query.Statement statement, com.lexmark.saperion.search.PageDefinition paging)
      This method returns an iterable over the filtered result of the search paging as defined.
      java.lang.Iterable<ItemType> list​(java.util.List<java.lang.String> fields, com.lexmark.saperion.search.expression.Expression filter, com.lexmark.saperion.search.PageDefinition paging)
      This method returns an iterable over the filtered result of the search paging as defined.
      java.lang.Iterable<ItemType> list​(java.util.List<java.lang.String> fields, com.lexmark.saperion.search.expression.Expression filter, java.util.List<com.lexmark.saperion.search.query.FieldOrderDescriptor> order, com.lexmark.saperion.search.PageDefinition paging)
      This method returns an iterable over the filtered result of the search paging as defined.
      com.lexmark.saperion.search.SearchResultPage<ItemType> page​(int offset, int pageSize)
      This method retrieves the given page of the result of the search.
      com.lexmark.saperion.search.SearchResultPage<ItemType> page​(com.lexmark.saperion.search.PageDefinition pageDefinition)
      This method retrieves the given page of the result of the search.
      ItemType uniqueResult​(com.lexmark.saperion.search.expression.Expression filter)
      This convenience method expects the filter to return at most one result.
      • Methods inherited from interface com.lexmark.saperion.search.SearchExecutionService

        search
    • Method Detail

      • page

        com.lexmark.saperion.search.SearchResultPage<ItemType> page​(com.lexmark.saperion.search.PageDefinition pageDefinition)
                                                             throws com.lexmark.saperion.exceptions.EcmException
        This method retrieves the given page of the result of the search.
        Parameters:
        pageDefinition - the page to retrieve
        Returns:
        the given page of the result of the search
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • page

        com.lexmark.saperion.search.SearchResultPage<ItemType> page​(int offset,
                                                                    int pageSize)
                                                             throws com.lexmark.saperion.exceptions.EcmException
        This method retrieves the given page of the result of the search.
        Parameters:
        offset - the offset of the page
        pageSize - the size of the page
        Returns:
        the given page of the result of the search
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.query.Statement statement,
                                          com.lexmark.saperion.search.PageDefinition paging)
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the filtered result of the search paging as defined.
        Parameters:
        statement - a statement filtering the result
        paging - the paging the returned iterator should use
        Returns:
        an iterator over the filtered result paging as defined.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list​(java.util.List<java.lang.String> fields,
                                          com.lexmark.saperion.search.expression.Expression filter,
                                          java.util.List<com.lexmark.saperion.search.query.FieldOrderDescriptor> order,
                                          com.lexmark.saperion.search.PageDefinition paging)
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the filtered result of the search paging as defined.
        Parameters:
        fields - the fields of the result to deliver
        filter - a filter for the result
        order - the order of the result list
        paging - the paging the returned iterator should use
        Returns:
        an iterator over the filtered result paging as defined.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list​(java.util.List<java.lang.String> fields,
                                          com.lexmark.saperion.search.expression.Expression filter,
                                          com.lexmark.saperion.search.PageDefinition paging)
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the filtered result of the search paging as defined.
        Parameters:
        fields - the fields of the result to deliver
        filter - a filter for the result
        paging - the paging the returned iterator should use
        Returns:
        an iterator over the filtered result paging as defined.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.expression.Expression filter,
                                          java.util.List<com.lexmark.saperion.search.query.FieldOrderDescriptor> order,
                                          com.lexmark.saperion.search.PageDefinition paging)
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the filtered result of the search paging as defined.
        Parameters:
        filter - a filter for the result
        order - the order of the result list
        paging - the paging the returned iterator should use
        Returns:
        an iterator over the filtered result paging as defined.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.expression.Expression filter,
                                          com.lexmark.saperion.search.PageDefinition paging)
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the filtered result of the search paging as defined.
        Parameters:
        filter - a filter for the result
        paging - the paging the returned iterator should use
        Returns:
        an iterator over the filtered result paging as defined.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.expression.Expression filter)
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the filtered result of the search using the default paging.
        Parameters:
        filter - a filter for the result
        Returns:
        an iterator over the filtered result using the default paging.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • list

        java.lang.Iterable<ItemType> list()
                                   throws com.lexmark.saperion.exceptions.EcmException
        This method returns an iterable over the complete result of the search using the default paging.
        Returns:
        an iterator over the complete result using the default paging.
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • uniqueResult

        ItemType uniqueResult​(com.lexmark.saperion.search.expression.Expression filter)
                       throws com.lexmark.saperion.exceptions.EcmException
        This convenience method expects the filter to return at most one result. If no such element exists null is returned. If one such element exists it is returned. Otherwise an IllegalRequestException is thrown.
        Parameters:
        filter - a filter yielding true for at most one element
        Returns:
        the element the filter yields true for
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • exists

        boolean exists​(com.lexmark.saperion.search.expression.Expression filter)
                throws com.lexmark.saperion.exceptions.EcmException
        This convenience method checks whether an element matching the filter actually exists.
        Parameters:
        filter - the filter to check
        Returns:
        whether an element matching the filter actually exists
        Throws:
        com.lexmark.saperion.exceptions.EcmException