Class GroupImpl

java.lang.Object
com.querydsl.core.group.GroupImpl
All Implemented Interfaces:
Group

public class GroupImpl extends Object implements Group
Default implementation of the Group interface
Author:
sasa, tiwe
  • Constructor Details

  • Method Details

    • add

      public void add(Object[] row)
    • getGroup

      public <T, R> R getGroup(GroupExpression<T,R> definition)
      Description copied from interface: Group
      Returns the value of the given group.
      Specified by:
      getGroup in interface Group
      Type Parameters:
      T - Type of element in a single ResultSet row, i.e. type of Expression<T>
      R - Target type of this group, e.g. List<T>
      Returns:
      Value of given group definition in this group
    • getList

      public <T> List<T> getList(Expression<T> expr)
      Description copied from interface: Group
      Returns a List of values in this group.
      Specified by:
      getList in interface Group
      Type Parameters:
      T - Value type of List
      Parameters:
      expr - Grouped expression
      Returns:
      List of values in this group
    • getMap

      public <K, V> Map<K,V> getMap(Expression<K> key, Expression<V> value)
      Description copied from interface: Group
      Returns a Map of values in this group
      Specified by:
      getMap in interface Group
      Type Parameters:
      K - Key type of result Map
      V - Value type of result Map
      Parameters:
      key - Key expression
      value - Value expression
      Returns:
      Map of values in this group
    • getSortedMap

      public <K, V> SortedMap<K,V> getSortedMap(Expression<K> key, Expression<V> value)
      Description copied from interface: Group
      Returns a SortedMap of values in this group
      Specified by:
      getSortedMap in interface Group
      Type Parameters:
      K - Key type of result Map
      V - Value type of result Map
      Parameters:
      key - Key expression
      value - Value expression
      Returns:
      Map of values in this group
    • getOne

      public <T> T getOne(Expression<T> expr)
      Description copied from interface: Group
      Returns the value of the given single valued expression. This is the first value of given column within this group of the ResultSet.
      Specified by:
      getOne in interface Group
      Type Parameters:
      T - Value type
      Parameters:
      expr - Grouped expression
      Returns:
      Value of given expression in this group
    • getSet

      public <T> Set<T> getSet(Expression<T> expr)
      Description copied from interface: Group
      Returns a Set of values in this group.
      Specified by:
      getSet in interface Group
      Type Parameters:
      T - Value type of Set
      Parameters:
      expr - Grouped expression
      Returns:
      Set of values in this group
    • getSortedSet

      public <T> SortedSet<T> getSortedSet(Expression<T> expr)
      Description copied from interface: Group
      Returns a SortedSet of values in this group.
      Specified by:
      getSortedSet in interface Group
      Type Parameters:
      T - Value type of Set
      Parameters:
      expr - Grouped expression
      Returns:
      Set of values in this group
    • toArray

      public Object[] toArray()
      Description copied from interface: Group
      Groups elements as an array
      Specified by:
      toArray in interface Group
      Returns:
      elements as an array