Class FilterServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Long count​(java.lang.String filterId)
      Executes the query of the filter and returns the result count.
      java.lang.Long count​(java.lang.String filterId, Query<?,​?> extendingQuery)
      Executes the extended query of the filter and returns the result count.
      FilterQuery createFilterQuery()
      Creates a new filter query
      FilterQuery createTaskFilterQuery()
      Creates a new task filter query.
      void deleteFilter​(java.lang.String filterId)
      Deletes a filter by its id.
      Filter getFilter​(java.lang.String filterId)
      Returns the filter for the given filter id.
      <T> java.util.List<T> list​(java.lang.String filterId)
      Executes the query of the filter and returns the result as list.
      <T,​Q extends Query<?,​T>>
      java.util.List<T>
      list​(java.lang.String filterId, Q extendingQuery)
      Executes the extended query of a filter and returns the result as list.
      <T> java.util.List<T> listPage​(java.lang.String filterId, int firstResult, int maxResults)
      Executes the query of the filter and returns the result in the given boundaries as list.
      <T,​Q extends Query<?,​T>>
      java.util.List<T>
      listPage​(java.lang.String filterId, Q extendingQuery, int firstResult, int maxResults)
      Executes the extended query of a filter and returns the result in the given boundaries as list.
      Filter newTaskFilter()
      Creates a new task filter.
      Filter newTaskFilter​(java.lang.String filterName)
      Creates a new task filter with a given name.
      Filter saveFilter​(Filter filter)
      Saves the filter in the database.
      <T> T singleResult​(java.lang.String filterId)
      Executes the query of the filter and returns the a single result.
      <T,​Q extends Query<?,​T>>
      T
      singleResult​(java.lang.String filterId, Q extendingQuery)
      Executes the extended query of the filter and returns the a single result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FilterServiceImpl

        public FilterServiceImpl()
    • Method Detail

      • newTaskFilter

        public Filter newTaskFilter​(java.lang.String filterName)
        Description copied from interface: FilterService
        Creates a new task filter with a given name.
        Specified by:
        newTaskFilter in interface FilterService
        Returns:
        a new task filter with a name
      • saveFilter

        public Filter saveFilter​(Filter filter)
        Description copied from interface: FilterService
        Saves the filter in the database.
        Specified by:
        saveFilter in interface FilterService
        Parameters:
        filter - the filter to save
        Returns:
        return the saved filter
      • getFilter

        public Filter getFilter​(java.lang.String filterId)
        Description copied from interface: FilterService
        Returns the filter for the given filter id.
        Specified by:
        getFilter in interface FilterService
        Parameters:
        filterId - the id of the filter
        Returns:
        the filter
      • deleteFilter

        public void deleteFilter​(java.lang.String filterId)
        Description copied from interface: FilterService
        Deletes a filter by its id.
        Specified by:
        deleteFilter in interface FilterService
        Parameters:
        filterId - the id of the filter
      • list

        public <T> java.util.List<T> list​(java.lang.String filterId)
        Description copied from interface: FilterService
        Executes the query of the filter and returns the result as list.
        Specified by:
        list in interface FilterService
        Parameters:
        filterId - the the id of the filter
        Returns:
        the query result as list
      • list

        public <T,​Q extends Query<?,​T>> java.util.List<T> list​(java.lang.String filterId,
                                                                           Q extendingQuery)
        Description copied from interface: FilterService
        Executes the extended query of a filter and returns the result as list.
        Specified by:
        list in interface FilterService
        Parameters:
        filterId - the id of the filter
        extendingQuery - additional query to extend the filter query
        Returns:
        the query result as list
      • listPage

        public <T> java.util.List<T> listPage​(java.lang.String filterId,
                                              int firstResult,
                                              int maxResults)
        Description copied from interface: FilterService
        Executes the query of the filter and returns the result in the given boundaries as list.
        Specified by:
        listPage in interface FilterService
        Parameters:
        filterId - the the id of the filter
        firstResult - first result to select
        maxResults - maximal number of results
        Returns:
        the query result as list
      • listPage

        public <T,​Q extends Query<?,​T>> java.util.List<T> listPage​(java.lang.String filterId,
                                                                               Q extendingQuery,
                                                                               int firstResult,
                                                                               int maxResults)
        Description copied from interface: FilterService
        Executes the extended query of a filter and returns the result in the given boundaries as list.
        Specified by:
        listPage in interface FilterService
        Parameters:
        filterId - the id of the filter
        extendingQuery - additional query to extend the filter query
        firstResult - first result to select
        maxResults - maximal number of results
        Returns:
        the query result as list
      • singleResult

        public <T> T singleResult​(java.lang.String filterId)
        Description copied from interface: FilterService
        Executes the query of the filter and returns the a single result.
        Specified by:
        singleResult in interface FilterService
        Parameters:
        filterId - the the id of the filter
        Returns:
        the single query result
      • singleResult

        public <T,​Q extends Query<?,​T>> T singleResult​(java.lang.String filterId,
                                                                   Q extendingQuery)
        Description copied from interface: FilterService
        Executes the extended query of the filter and returns the a single result.
        Specified by:
        singleResult in interface FilterService
        Parameters:
        filterId - the the id of the filter
        extendingQuery - additional query to extend the filter query
        Returns:
        the single query result
      • count

        public java.lang.Long count​(java.lang.String filterId)
        Description copied from interface: FilterService
        Executes the query of the filter and returns the result count.
        Specified by:
        count in interface FilterService
        Parameters:
        filterId - the the id of the filter
        Returns:
        the result count
      • count

        public java.lang.Long count​(java.lang.String filterId,
                                    Query<?,​?> extendingQuery)
        Description copied from interface: FilterService
        Executes the extended query of the filter and returns the result count.
        Specified by:
        count in interface FilterService
        Parameters:
        filterId - the the id of the filter
        extendingQuery - additional query to extend the filter query
        Returns:
        the result count