public class FilterServiceImpl extends ServiceImpl implements FilterService
commandExecutor
Constructor and Description |
---|
FilterServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Long |
count(String filterId)
Executes the query of the filter and returns the result count.
|
Long |
count(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(String filterId)
Deletes a filter by its id.
|
Filter |
getFilter(String filterId)
Returns the filter for the given filter id.
|
<T> List<T> |
list(String filterId)
Executes the query of the filter and returns the result as list.
|
<T,Q extends Query<?,T>> |
list(String filterId,
Q extendingQuery)
Executes the extended query of a filter and returns the result as list.
|
<T> List<T> |
listPage(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>> |
listPage(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(String filterName)
Creates a new task filter with a given name.
|
Filter |
saveFilter(Filter filter)
Saves the filter in the database.
|
<T> T |
singleResult(String filterId)
Executes the query of the filter and returns the a single result.
|
<T,Q extends Query<?,T>> |
singleResult(String filterId,
Q extendingQuery)
Executes the extended query of the filter and returns the a single result.
|
getCommandExecutor, setCommandExecutor
public Filter newTaskFilter()
FilterService
newTaskFilter
in interface FilterService
public Filter newTaskFilter(String filterName)
FilterService
newTaskFilter
in interface FilterService
public FilterQuery createFilterQuery()
FilterService
createFilterQuery
in interface FilterService
public FilterQuery createTaskFilterQuery()
FilterService
createTaskFilterQuery
in interface FilterService
public Filter saveFilter(Filter filter)
FilterService
saveFilter
in interface FilterService
filter
- the filter to savepublic Filter getFilter(String filterId)
FilterService
getFilter
in interface FilterService
filterId
- the id of the filterpublic void deleteFilter(String filterId)
FilterService
deleteFilter
in interface FilterService
filterId
- the id of the filterpublic <T> List<T> list(String filterId)
FilterService
list
in interface FilterService
filterId
- the the id of the filterpublic <T,Q extends Query<?,T>> List<T> list(String filterId, Q extendingQuery)
FilterService
list
in interface FilterService
filterId
- the id of the filterextendingQuery
- additional query to extend the filter querypublic <T> List<T> listPage(String filterId, int firstResult, int maxResults)
FilterService
listPage
in interface FilterService
filterId
- the the id of the filterfirstResult
- first result to selectmaxResults
- maximal number of resultspublic <T,Q extends Query<?,T>> List<T> listPage(String filterId, Q extendingQuery, int firstResult, int maxResults)
FilterService
listPage
in interface FilterService
filterId
- the id of the filterextendingQuery
- additional query to extend the filter queryfirstResult
- first result to selectmaxResults
- maximal number of resultspublic <T> T singleResult(String filterId)
FilterService
singleResult
in interface FilterService
filterId
- the the id of the filterpublic <T,Q extends Query<?,T>> T singleResult(String filterId, Q extendingQuery)
FilterService
singleResult
in interface FilterService
filterId
- the the id of the filterextendingQuery
- additional query to extend the filter querypublic Long count(String filterId)
FilterService
count
in interface FilterService
filterId
- the the id of the filterpublic Long count(String filterId, Query<?,?> extendingQuery)
FilterService
count
in interface FilterService
filterId
- the the id of the filterextendingQuery
- additional query to extend the filter queryCopyright © 2017. All rights reserved.