Class AbstractSearchEntity<C extends java.io.Serializable,​S extends PersistentObject>

    • Constructor Detail

      • AbstractSearchEntity

        public AbstractSearchEntity​(SearchEntityDescriptor searchDescriptor,
                                    org.bonitasoft.engine.search.SearchOptions options)
        Parameters:
        searchDescriptor - The search descriptor of the searched entity
        options - The options of the search
    • Method Detail

      • search

        public org.bonitasoft.engine.search.SearchResult<C> search()
                                                            throws org.bonitasoft.engine.exception.SearchException
        execute this search and return the result
        Returns:
        the result of the search
        Throws:
        org.bonitasoft.engine.exception.SearchException
      • executeCount

        public abstract long executeCount​(QueryOptions queryOptions)
                                   throws SBonitaReadException
        Execute the count here
        Parameters:
        queryOptions - The query options to execute the count with
        Returns:
        The number of result on the server
        Throws:
        SBonitaReadException - when the search failed to retrieve the count number
      • executeSearch

        public abstract java.util.List<S> executeSearch​(QueryOptions queryOptions)
                                                 throws SBonitaReadException
        Execute the search here
        Parameters:
        queryOptions - The query options to execute the search with
        Returns:
        The list of searched server objects
        Throws:
        SBonitaReadException - when the search failed to retrieve the results
      • convertToClientObjects

        public abstract java.util.List<C> convertToClientObjects​(java.util.List<S> serverObjects)
                                                          throws SBonitaException
        Must convert server objects in client objects here
        Parameters:
        serverObjects - The server object to convert
        Returns:
        The list of the client objects corresponding to the server objects
        Throws:
        SBonitaException
      • getSearchFilter

        protected org.bonitasoft.engine.search.impl.SearchFilter getSearchFilter​(org.bonitasoft.engine.search.SearchOptions searchOptions,
                                                                                 java.lang.String searchedKey)