Record Class Aggregate<T>
java.lang.Object
java.lang.Record
ch.tocco.nice2.persist.core.api.hibernate.query.builder.Aggregate<T>
public record Aggregate<T>(AggregateFunction function, String field, Class<T> resultType)
extends Record
A single aggregate of an
AggregateQueryBuilder, which is also used to read its value from the AggregateResult.-
Constructor Summary
ConstructorsConstructorDescriptionAggregate(AggregateFunction function, String field, Class<T> resultType) Creates an instance of aAggregaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.static <T> Aggregate<T> static <T> Aggregate<T> Returns the value of theresultTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Aggregate
Creates an instance of aAggregaterecord class.- Parameters:
function- the value for thefunctionrecord componentfield- the value for thefieldrecord componentresultType- the value for theresultTyperecord component
-
-
Method Details
-
sum
-
avg
-
min
-
max
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
resultType
-