Class TestDoubleQuery<T>

java.lang.Object
io.ran.CrudRepoBaseQuery<T,Z>
io.ran.TestDoubleQuery<T,ValqueriesQuery<T>>
com.valqueries.automapper.TestDoubleQuery<T>
All Implemented Interfaces:
ValqueriesGroupQuery<T>, ValqueriesQuery<T>, CrudRepository.InlineQuery<T,ValqueriesQuery<T>>

public class TestDoubleQuery<T> extends TestDoubleQuery<T,ValqueriesQuery<T>> implements ValqueriesQuery<T>, ValqueriesGroupQuery<T>
  • Constructor Details

  • Method Details

    • eq

      public ValqueriesQuery<T> eq(Property.PropertyValue<?> propertyValue)
      Specified by:
      eq in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      eq in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • notEq

      public ValqueriesQuery<T> notEq(Property.PropertyValue<?> propertyValue)
      Specified by:
      notEq in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      notEq in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • gt

      public <X extends Comparable<? super X>> ValqueriesQuery<T> gt(Property.PropertyValue<X> propertyValue)
      Specified by:
      gt in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      gt in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • lt

      public <X extends Comparable<? super X>> ValqueriesQuery<T> lt(Property.PropertyValue<X> propertyValue)
      Specified by:
      lt in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      lt in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • isNull

      public ValqueriesQuery<T> isNull(Property<?> property)
      Specified by:
      isNull in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      isNull in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • isNotNull

      public ValqueriesQuery<T> isNotNull(Property<?> property)
      Specified by:
      isNotNull in interface ValqueriesQuery<T>
    • in

      public ValqueriesQuery<T> in(Property.PropertyValueList<?> propertyValues)
      Specified by:
      in in interface ValqueriesQuery<T>
    • notIn

      public ValqueriesQuery<T> notIn(Property.PropertyValueList<?> propertyValues)
      Specified by:
      notIn in interface ValqueriesQuery<T>
    • like

      public ValqueriesQuery<T> like(Property.PropertyValue<String> propertyValue)
      Specified by:
      like in interface ValqueriesQuery<T>
    • notLike

      public ValqueriesQuery<T> notLike(Property.PropertyValue<String> propertyValue)
      Specified by:
      notLike in interface ValqueriesQuery<T>
    • freetext

      public ValqueriesQuery<T> freetext(Property.PropertyValue<String> propertyValue)
      Specified by:
      freetext in interface ValqueriesQuery<T>
    • withEager

      public ValqueriesQuery<T> withEager(RelationDescriber relationDescriber)
      Specified by:
      withEager in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      withEager in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • subQuery

      public <X, Z extends CrudRepository.InlineQuery<X, Z>> ValqueriesQuery<T> subQuery(RelationDescriber relationDescriber, Consumer<Z> consumer)
      Specified by:
      subQuery in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      subQuery in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • getQuery

      protected ValqueriesQuery<T> getQuery(Class<?> aClass)
      Specified by:
      getQuery in class TestDoubleQuery<T,ValqueriesQuery<T>>
    • getValue

      protected <X> X getValue(Property<X> property, T t)
    • in

      public <X> ValqueriesQuery<T> in(Function<T,X> field, Collection<X> value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field equals any of the specified values.

      Example:

      
       query.in(Person::getName, List.of("Bob", "Frank"))
       

      This will match people with the name "Bob" or "Frank".

      Null values are never in, but if a mix of null and non-null values are passed, the null values will be ignored due to the OR nature of the in operation.

      Specified by:
      in in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the getter of the field to match
      value - the values to match, in an OR fashion
      Returns:
      the query, for chaining
    • in

      public <X> ValqueriesQuery<T> in(BiConsumer<T,X> field, Collection<X> value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field equals any of the specified values.

      Example:

      
       query.in(Person::setName, List.of("Bob", "Frank"))
       

      This will match people with the name "Bob" or "Frank".

      Null values are never in, but if a mix of null and non-null values are passed, the null values will be ignored due to the OR nature of the in operation.

      If you wish to match both null and non-null values you can use .or(or -> or.isNull(field).in(field, value).

      Specified by:
      in in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the setter of the field to match
      value - the values to match, in an OR fashion
      Returns:
      the query, for chaining
    • in

      public <X> ValqueriesQuery<T> in(Function<T,X> field, X... value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field equals any of the specified values.

      Example:

      
       query.in(Person::getName, "Bob", "Frank")
       

      This will match people with the name "Bob" or "Frank".

      Null values are never in, but if a mix of null and non-null values are passed, the null values will be ignored due to the OR nature of the in operation.

      If you wish to match both null and non-null values you can use .or(or -> or.isNull(field).in(field, value).

      Specified by:
      in in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the getter of the field to match
      value - the values to match, in an OR fashion
      Returns:
      the query, for chaining
    • in

      public <X> ValqueriesQuery<T> in(BiConsumer<T,X> field, X... value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field equals any of the specified values.

      Example:

      
       query.in(Person::setName, "Bob", "Frank")
       

      This will match people with the name "Bob" or "Frank".

      Null values are never in, but if a mix of null and non-null values are passed, the null values will be ignored due to the OR nature of the in operation.

      If you wish to match both null and non-null values you can use .or(or -> or.isNull(field).in(field, value).

      Specified by:
      in in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the setter of the field to match
      value - the values to match, in an OR fashion
      Returns:
      the query, for chaining
    • notIn

      public <X> ValqueriesQuery<T> notIn(Function<T,X> field, Collection<X> value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field does not equal any of the specified values.

      Example:

      
       query.notIn(Person::getName, List.of("Bob", "Frank"))
       

      This will match people with a name other than "Bob" or "Frank", but not people with a null name.

      If the passed values include a null value, no match will be made.

      The empty list is a valid argument, and will match all values. This is equivalent to not having the condition at all.

      Specified by:
      notIn in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the getter of the field to match
      value - the values to match, in an AND fashion
      Returns:
      the query, for chaining
    • notIn

      public <X> ValqueriesQuery<T> notIn(BiConsumer<T,X> field, Collection<X> value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field does not equal any of the specified values.

      Example:

      
       query.notIn(Person::setName, List.of("Bob", "Frank"))
       

      This will match people with a name other than "Bob" or "Frank", but not people with a null name.

      If the passed values include a null value, no match will be made.

      The empty list is a valid argument, and will match all values. This is equivalent to not having the condition at all.

      Specified by:
      notIn in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the setter of the field to match
      value - the values to match, in an AND fashion
      Returns:
      the query, for chaining
    • notIn

      public <X> ValqueriesQuery<T> notIn(Function<T,X> field, X... value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field does not equal any of the specified values.

      Example:

      
       query.notIn(Person::getName, "Bob", "Frank")
       

      This will match people with a name other than "Bob" or "Frank", but not people with a null name.

      If the passed values include a null value, no match will be made.

      The empty list is a valid argument, and will match all values. This is equivalent to not having the condition at all.

      Specified by:
      notIn in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the getter of the field to match
      value - the values to match, in an AND fashion
      Returns:
      the query, for chaining
    • notIn

      public <X> ValqueriesQuery<T> notIn(BiConsumer<T,X> field, X... value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field does not equal any of the specified values.

      Example:

      
       query.notIn(Person::setName, "Bob", "Frank")
       

      This will match people with a name other than "Bob" or "Frank", but not people with a null name.

      If the passed values include a null value, no match will be made.

      The empty list is a valid argument, and will match all values. This is equivalent to not having the condition at all.

      Specified by:
      notIn in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the field and value
      Parameters:
      field - a method reference to the setter of the field to match
      value - the values to match, in an AND fashion
      Returns:
      the query, for chaining
    • like

      public ValqueriesQuery<T> like(Function<T,String> field, String value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field is like the specified value.

      Like uses a simplified version of SQL LIKE, where the value can contain the SQL wildcards % and _.

      The % wildcard matches any number of characters, including zero. The _ wildcard matches exactly one character.

      Example:

      
       query.like(Person::getName, "Bob%")
       

      This will match people with a name starting with "Bob".

      Secondary example:

      
       query.like(Person::getName, "%Bob%")
       

      This will match people with a name containing "Bob" anywhere in the name.

      Tertiary example:

      
           query.like(Person::getName, "B_b")
           

      This will match people with a name containing "B", followed by any letter, then followed by "b", exactly.

      like will never match null values in the database, additionally if a null value is passed, no match will be made even against non-null values.

      Specified by:
      like in interface ValqueriesQuery<T>
      Parameters:
      field - a method reference to the getter of the field to match
      value - the value to match
      Returns:
      the query, for chaining
    • like

      public ValqueriesQuery<T> like(BiConsumer<T,String> field, String value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field is like the specified value.

      Like uses a simplified version of SQL LIKE, where the value can contain the SQL wildcards % and _.

      The % wildcard matches any number of characters, including zero. The _ wildcard matches exactly one character.

      Example:

      
       query.like(Person::setName, "Bob%")
       

      This will match people with a name starting with "Bob".

      Secondary example:

      
       query.like(Person::setName, "%Bob%")
       

      This will match people with a name containing "Bob" anywhere in the name.

      Tertiary example:

      
           query.like(Person::setName, "B_b")
           

      This will match people with a name containing "B", followed by any letter, then followed by "b", exactly.

      like will never match null values in the database, additionally if a null value is passed, no match will be made even against non-null values.

      Specified by:
      like in interface ValqueriesQuery<T>
      Parameters:
      field - a method reference to the setter of the field to match
      value - the value to match
      Returns:
      the query, for chaining
    • notLike

      public ValqueriesQuery<T> notLike(Function<T,String> field, String value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field is not like the specified value.

      Like uses a simplified version of SQL LIKE, where the value can contain the SQL wildcards % and _.

      The % wildcard matches any number of characters, including zero. The _ wildcard matches exactly one character.

      Example:

      
       query.notLike(Person::getName, "Bob%")
       

      This will match people with a name not starting with "Bob".

      Secondary example:

      
       query.notLike(Person::getName, "%Bob%")
       

      This will match people with a name not containing "Bob" anywhere in the name.

      Tertiary example:

      
           query.notLike(Person::getName, "B_b")
           

      This will match people with a name that is not "B", followed by any letter, then followed by "b", exactly. For example it will match "Frank" or "Bubba", but not "Bob".

      notLike will never match null values in the database, additionally if a null value is passed, no match will be made even against non-null values.

      Specified by:
      notLike in interface ValqueriesQuery<T>
      Parameters:
      field - a method reference to the getter of the field to match
      value - the value to match
      Returns:
      the query, for chaining
    • notLike

      public ValqueriesQuery<T> notLike(BiConsumer<T,String> field, String value)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field is not like the specified value.

      Like uses a simplified version of SQL LIKE, where the value can contain the SQL wildcards % and _.

      The % wildcard matches any number of characters, including zero. The _ wildcard matches exactly one character.

      Example:

      
       query.notLike(Person::setName, "Bob%")
       

      This will match people with a name not starting with "Bob".

      Secondary example:

      
       query.notLike(Person::setName, "%Bob%")
       

      This will match people with a name not containing "Bob" anywhere in the name.

      Tertiary example:

      
           query.notLike(Person::setName, "B_b")
           

      This will match people with a name that is not "B", followed by any letter, then followed by "b", exactly. For example, it will match "Frank" or "Bubba", but not "Bob".

      notLike will never match null values in the database, additionally if a null value is passed, no match will be made even against non-null values.

      Specified by:
      notLike in interface ValqueriesQuery<T>
      Parameters:
      field - a method reference to the setter of the field to match
      value - the value to match
      Returns:
      the query, for chaining
    • freetext

      public ValqueriesQuery<T> freetext(Function<T,String> field, String value)
      Specified by:
      freetext in interface ValqueriesQuery<T>
    • freetext

      public ValqueriesQuery<T> freetext(BiConsumer<T,String> field, String value)
      Specified by:
      freetext in interface ValqueriesQuery<T>
    • isNotNull

      public ValqueriesQuery<T> isNotNull(Function<T,?> field)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field is not null.

      Example:

      
           query.isNotNull(Person::getEmail)
           

      This will match people whose email is not null.

      Note: if the model class has fields of primitive type, they won't be null, even if the database contains NULL values. In this case isNotNull will still match correctly based on the values in the database.

      Specified by:
      isNotNull in interface ValqueriesQuery<T>
      Parameters:
      field - a method reference to the getter of the field to match
      Returns:
      the query, for chaining
    • isNotNull

      public ValqueriesQuery<T> isNotNull(BiConsumer<T,?> field)
      Description copied from interface: ValqueriesQuery
      Match if the value of a field is not null.

      Example:

      
           query.isNotNull(Person::setEmail)
           

      This will match people whose email is not null.

      Note: if the model class has fields of primitive type, they won't be null, even if the database contains NULL values. In this case isNotNull will still match correctly based on the values in the database.

      Specified by:
      isNotNull in interface ValqueriesQuery<T>
      Parameters:
      field - a method reference to the setter of the field to match
      Returns:
      the query, for chaining
    • subQuery

      public <X> ValqueriesQuery<T> subQuery(Function<T,X> field, Consumer<ValqueriesQuery<X>> subQuery)
      Description copied from interface: ValqueriesQuery
      Perform further queries on a related model.

      A related model is one that is referenced by a field in the current model and which is mapped via a Relation annotation.

      Example:

      
           query.subQuery(Person::getAddress,
           subQuery -> subQuery.eq(Address::getCity, "Stockholm"))
           

      This will match people whose address has the city "Stockholm".

      The subQuery is not executed until the main query is executed.

      The subQuery is executed in the same transaction as the main query.

      Specified by:
      subQuery in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the sub-object
      Parameters:
      field - a method reference to the getter of the field to match
      subQuery - a consumer that will be called with the subQuery
      Returns:
      the query, for chaining
    • subQuery

      public <X> ValqueriesQuery<T> subQuery(BiConsumer<T,X> field, Consumer<ValqueriesQuery<X>> subQuery)
      Description copied from interface: ValqueriesQuery
      Perform further queries on a related model.

      A related model is one that is referenced by a field in the current model and which is mapped via a Relation annotation.

      Example:

      
           query.subQuery(Person::setAddress,
           subQuery -> subQuery.eq(Address::setCity, "Stockholm"))
           

      This will match people whose address has the city "Stockholm".

      The subQuery is not executed until the main query is executed.

      The subQuery is executed in the same transaction as the main query.

      Specified by:
      subQuery in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the sub-object
      Parameters:
      field - a method reference to the setter of the field to match
      subQuery - a consumer that will be called with the subQuery
      Returns:
      the query, for chaining
    • subQueryList

      public <X> ValqueriesQuery<T> subQueryList(Function<T,? extends Collection<X>> field, Consumer<ValqueriesQuery<X>> subQuery)
      Description copied from interface: ValqueriesQuery
      Perform further queries on a related model which has a one-to-many relation.

      A related model is one that is referenced by a field in the current model and which is mapped via a Relation annotation.

      Example:

      Assume that Person object has a list of Address objects, and that the Address object has a field called "city".

      
           query.subQueryList(Person::getAddresses,
           subQuery -> subQuery.eq(Address::getCity, "Stockholm"))
           

      This will match people who have any addresses where the city is "Stockholm".

      The subQuery is not executed until the main query is executed.

      The subQuery is executed in the same transaction as the main query.

      Specified by:
      subQueryList in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the sub-object
      subQuery - a consumer that will be called with the subQuery
      Returns:
      the query, for chaining
    • subQueryList

      public <X> ValqueriesQuery<T> subQueryList(BiConsumer<T,? extends Collection<X>> field, Consumer<ValqueriesQuery<X>> subQuery)
      Description copied from interface: ValqueriesQuery
      Perform further queries on a related model which has a one-to-many relation.

      A related model is one that is referenced by a field in the current model and which is mapped via a Relation annotation.

      Example:

      Assume that Person object has a list of Address objects, and that the Address object has a field called "city".

      
           query.subQueryList(Person::setAddresses,
           subQuery -> subQuery.eq(Address::setCity, "Stockholm"))
           

      This will match people who have any address(es) where the city is "Stockholm".

      The subQuery is not executed until the main query is executed.

      The subQuery is executed in the same transaction as the main query.

      Specified by:
      subQueryList in interface ValqueriesQuery<T>
      Type Parameters:
      X - the type of the sub-object
      subQuery - a consumer that will be called with the subQuery
      Returns:
      the query, for chaining
    • subQueryList

      public <X> ValqueriesQuery<T> subQueryList(RelationDescriber relationDescriber, Consumer<ValqueriesQuery<X>> subQuery)
      Specified by:
      subQueryList in interface ValqueriesQuery<T>
    • update

      public CrudRepository.CrudUpdateResult update(Consumer<ValqueriesUpdate<T>> updaterConsumer)
      Specified by:
      update in interface ValqueriesQuery<T>
    • groupBy

      public ValqueriesGroupQuery<T> groupBy(Function<T,?>... fields)
      Description copied from interface: ValqueriesQuery
      Create a group by query.
      Specified by:
      groupBy in interface ValqueriesQuery<T>
      Parameters:
      fields - Getters of the fields to group by. The values of ValqueriesGroupResultRow.groupByValues() will be in the same order.
      Returns:
      the group by query that allows adding aggregations.
    • groupBy

      public ValqueriesGroupQuery<T> groupBy(BiConsumer<T,?>... fields)
      Description copied from interface: ValqueriesQuery
      Create a group by query.
      Specified by:
      groupBy in interface ValqueriesQuery<T>
      Parameters:
      fields - Setters of the fields to group by. The values of ValqueriesGroupResultRow.groupByValues() will be in the same order.
      Returns:
      the group by query that allows adding aggregations.
    • aggregateAll

      public ValqueriesGroupQuery<T> aggregateAll()
      Description copied from interface: ValqueriesQuery
      Allows to perform aggregations without grouping by any columns. The result will be a single row with empty ValqueriesGroupResultRow.groupByValues().
      Specified by:
      aggregateAll in interface ValqueriesQuery<T>
      Returns:
      the query that allows adding aggregations.
    • count

      public ValqueriesGroupQuery<T> count(Function<T,?> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that counts non-NULL values of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      count in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Getter of the field to count
      Returns:
      this query, for chaining
    • count

      public ValqueriesGroupQuery<T> count(BiConsumer<T,?> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that counts non-NULL values of a field.
      Specified by:
      count in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Setter of the field to count
      Returns:
      this query, for chaining
    • sum

      public ValqueriesGroupQuery<T> sum(Function<T,? extends Number> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that sums the values of a field. For Float and Double fields the result will be Double, for BigInteger and BigDecimal the result will be the same, for all other fields the result will be Long. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      sum in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Getter of the field to sum
      Returns:
      this query, for chaining
    • sum

      public ValqueriesGroupQuery<T> sum(BiConsumer<T,? extends Number> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that sums the values of a field. For Float and Double fields the result will be Double, for BigInteger and BigDecimal the result will be the same, for all other fields the result will be Long. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      sum in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Setter of the field to sum
      Returns:
      this query, for chaining
    • max

      public <X extends Comparable<? super X>> ValqueriesGroupQuery<T> max(Function<T,X> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that calculates the maximum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      max in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Getter of the field to calculate the maximum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • max

      public <X extends Comparable<? super X>> ValqueriesGroupQuery<T> max(BiConsumer<T,X> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that calculates the maximum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      max in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Setter of the field to calculate the maximum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • min

      public <X extends Comparable<? super X>> ValqueriesGroupQuery<T> min(Function<T,X> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that calculates the minimum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      min in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Getter of the field to calculate the minimum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • min

      public <X extends Comparable<? super X>> ValqueriesGroupQuery<T> min(BiConsumer<T,X> field)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that calculates the minimum value of a field. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      min in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Setter of the field to calculate the minimum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)
      Returns:
      this query, for chaining
    • concat

      public ValqueriesGroupQuery<T> concat(Function<T,?> field, String separator)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that concatenates the values of a field as a string. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      concat in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Getter of the field to concatenate
      separator - The separator to use between values
      Returns:
      this query, for chaining
    • concat

      public ValqueriesGroupQuery<T> concat(BiConsumer<T,?> field, String separator)
      Description copied from interface: ValqueriesGroupQuery
      Add an aggregation that concatenates the values of a field as a string. The values in ValqueriesGroupResultRow.aggregationValues() will be in the order aggregations were added to the query.
      Specified by:
      concat in interface ValqueriesGroupQuery<T>
      Parameters:
      field - Setter of the field to concatenate
      separator - The separator to use between values
      Returns:
      this query, for chaining
    • groupByExecute

      public Stream<ValqueriesGroupResultRow> groupByExecute()
      Description copied from interface: ValqueriesGroupQuery
      Execute the query.
      Specified by:
      groupByExecute in interface ValqueriesGroupQuery<T>
      Returns:
      A stream of rows, each containing the values of the fields that were grouped by and the values of the aggregations, both in the same order they were queried.
    • execute

      public Stream<T> execute()
      Description copied from interface: CrudRepository.InlineQuery
      Execute the query and return the results as a Stream.

      This is a terminal operation. As such, the query should not be reused after this method is called.

      The resulting Stream from the operation may be a lazy stream, meaning that the results are not fetched from the database until they are accessed. As such it is important that a terminal operation is performed on the stream within a reasonable time frame to avoid holding database connections open.

      Specified by:
      execute in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      execute in class TestDoubleQuery<T,ValqueriesQuery<T>>
      Returns:
      a Stream of the results
    • delete

      Description copied from interface: CrudRepository.InlineQuery
      Delete all entries that match the query.

      This is a terminal operation. As such, the query should not be reused after this method is called.

      WARNING: If you invoke no query methods prior to this, all rows in the table with be deleted.

      Specified by:
      delete in interface CrudRepository.InlineQuery<T,ValqueriesQuery<T>>
      Overrides:
      delete in class TestDoubleQuery<T,ValqueriesQuery<T>>
      Returns:
      a CrudRepository.CrudUpdateResult with the number of rows affected
      See Also: