TaackFilter (taack-ui 0.5.7-SNAPSHOT API)
Package: taack.domain

[Groovy] Class TaackFilter<T extends GormEntity<T>>

    • taack.domain.TaackFilter


    • @groovy.transform.CompileStatic
      final class TaackFilter<T extends GormEntity<T>>
      extends java.lang.Object

      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 TaackFilter.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.

      • Properties Summary

          Properties 
          Type Name and description
          int  max
      • Constructor Summary

          Constructors 
          Constructor and description
          TaackFilter (TaackFilter.FilterBuilder filterBuilder, org.hibernate.SessionFactory sessionFactory, java.util.Map<java.lang.String, ? extends java.lang.Object> theParams)
      • Methods Summary

          Methods 
          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
          final java.lang.Long executeQueryUniqueResult(java.lang.Class 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.
          java.lang.String getOrderString()
          java.lang.String getSortString()
          final grails.util.Pair<java.util.List<T>, java.lang.Long> list(java.lang.Class<T> aClass, int max, UiFilterSpecifier filterSpecifier, T tInstance, FieldInfo[] fields, TaackFilter.Order order, java.util.Collection<java.lang.Long> idsInList)
          list entities and number of results
          final grails.util.Pair<java.util.List<T>, java.lang.Long> list()
          java.lang.String toString()
      • Inherited Methods Summary

          Inherited Methods 
          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()
      • Property Detail

        • int max

      • Constructor Detail

        • TaackFilter(TaackFilter.FilterBuilder filterBuilder, org.hibernate.SessionFactory sessionFactory, java.util.Map<java.lang.String, ? extends java.lang.Object> theParams)

      • Method Detail

        • 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

          Parameters:
          query
          max - max number of results
          offset
          Returns:
          the list of objects

        • final java.lang.Long executeQueryUniqueResult(java.lang.Class 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. @return

          Parameters:
          aClass
          query
          max
          offset

        • java.lang.String getOrderString()

        • java.lang.String getSortString()

        • final grails.util.Pair<java.util.List<T>, java.lang.Long> list(java.lang.Class<T> aClass, int max, UiFilterSpecifier filterSpecifier, T tInstance, FieldInfo[] fields, TaackFilter.Order order, java.util.Collection<java.lang.Long> idsInList)

          list entities and number of results

          Parameters:
          aClass - type we want to list
          max - (optional) max number of results
          filterSpecifier - (optional) additional filter criteria that overrides the ones passed via params
          tInstance - (optional) object of the same class as aClass, allowing to add filter criteria
          sortableDirection - (optional) sort parameter
          idsInList - (optional) restrict the results to those ids
          Returns:
          pair that contains the max results and the total number of objects reached by the filter

        • final grails.util.Pair<java.util.List<T>, java.lang.Long> list()

        • @java.lang.Override java.lang.String toString()