@groovy.transform.CompileStatic class TaackSimpleFilterService extends java.lang.Object implements grails.web.api.WebAttributes
Service allowing to automatically filter data in a tableFilter. It is typically used in a table block. It uses params given from the UiFilterSpecifier to filter data.
The main methods are named TaackSimpleFilterService.list<T>. The uniq mandatory parameter is the Class we want the list for. Optional params includes allowed ids or passing a filter directly allow to restrict the list of objects returned.
Modifiers | Name | Description |
---|---|---|
class |
TaackSimpleFilterService.1 |
|
static class |
TaackSimpleFilterService.TaackSimpleFilterExtension |
Allow to register a GormEntity class as base class for TQL queries. |
Type | Name and description |
---|---|
static java.util.Map<java.lang.Class, ITaackFilterExtension> |
filterExtensionMap |
org.hibernate.SessionFactory |
sessionFactory |
Constructor and description |
---|
TaackSimpleFilterService
() |
Type Params | Return Type | Name and description |
---|---|---|
|
final java.util.List<java.lang.Object> |
executeQuery(java.lang.String query, java.util.Map<java.lang.String, java.lang.Object> namedParams, java.lang.Integer max, java.lang.Integer offset) Helper method allowing to execute a query |
<T> |
final T |
executeQueryUniqueResult(java.lang.Class<T> aClass, java.util.Map<java.lang.String, java.lang.Object> namedParams, java.lang.String query, java.lang.Integer max, java.lang.Integer offset) Helper method allowing to execute a query, after a type, returning an uniq result. |
<T extends GormEntity> |
final grails.util.Pair<java.util.List<T>, java.lang.Long> |
list(java.lang.Class<T> aClass, int max, SortableDirection sortableDirection, T tInstance) list entities and number of results |
<T extends GormEntity> |
final grails.util.Pair<java.util.List<T>, java.lang.Long> |
list(java.lang.Class<T> aClass, int max, SortableDirection sortableDirection, java.util.Collection<java.lang.Long> idsInList) list entities and number of results |
<T extends GormEntity> |
final grails.util.Pair<java.util.List<T>, java.lang.Long> |
list(java.lang.Class<T> aClass, int max, UiFilterSpecifier filterSpecifier, T tInstance, SortableDirection sortableDirection, java.util.Collection<java.lang.Long> idsInList) list entities and number of results |
|
java.util.List |
listGroup(java.lang.Class aClass) When a group header is present in the table, list the distinct values for the selected group (without applying the filter) |
<T extends GormEntity> |
final grails.util.Pair<java.util.List<T>, java.lang.Long> |
listInGroup(java.lang.Object group, java.lang.Class<T> aClass, UiFilterSpecifier f, T t) List objects in the given group |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Helper method allowing to execute a query
max
- max number of resultsHelper method allowing to execute a query, after a type, returning an uniq result. @return
list entities and number of results
aClass
- type we want to listmax
- (optional) max number of resultssortableDirection
- (optional) sort parametertInstance
- object of the same class as aClass, allowing to add filter criterialist entities and number of results
aClass
- type we want to listmax
- (optional) max number of resultssortableDirection
- (optional) sort parameteridsInList
- restrict the results to those idslist entities and number of results
aClass
- type we want to listmax
- (optional) max number of resultsfilterSpecifier
- (optional) additional filter criteria that overrides the ones passed via paramstInstance
- (optional) object of the same class as aClass, allowing to add filter criteriasortableDirection
- (optional) sort parameteridsInList
- (optional) restrict the results to those idsWhen a group header is present in the table, list the distinct values for the selected group (without applying the filter)
aClass
- class displayed in the tableList objects in the given group
group
- the group (from listGroup(Class)aClass
- class displayed in the tablef
- filter to apply while retrieving the listt
- object instance of type aClass that add filter criteriaGroovy Documentation