Record Class AnyAggregationReference<SR,T>
java.lang.Object
java.lang.Record
org.hibernate.search.engine.search.reference.aggregation.AnyAggregationReference<SR,T>
- Type Parameters:
SR- Scope root typeT- The type of the aggregated field.- Record Components:
absolutePath- The absolut field path.scopeRootType- The class representing the scope root type.valueModel- The model of aggregated values. SeeValueModel.aggregationType- The class representing the type of the aggregated field, as pervalueModel.
- All Implemented Interfaces:
AggregationFieldReference<SR>,AvgAggregationFieldReference<SR,,T> CountAggregationFieldReference<SR>,CountDistinctAggregationFieldReference<SR>,MaxAggregationFieldReference<SR,,T> MinAggregationFieldReference<SR,,T> RangeAggregationFieldReference<SR,,T> SumAggregationFieldReference<SR,,T> TermsAggregationFieldReference<SR,,T> TypedAggregationFieldReference<SR,,T> FieldReference<SR>
@Incubating
public record AnyAggregationReference<SR,T> (String absolutePath, Class<SR> scopeRootType, ValueModel valueModel, Class<T> aggregationType)
extends Record
implements AvgAggregationFieldReference<SR,T>, CountAggregationFieldReference<SR>, CountDistinctAggregationFieldReference<SR>, MaxAggregationFieldReference<SR,T>, MinAggregationFieldReference<SR,T>, RangeAggregationFieldReference<SR,T>, SumAggregationFieldReference<SR,T>, TermsAggregationFieldReference<SR,T>
A generic aggregated-field reference that can be manually created and passed to any aggregation-DSL methods that require a field reference.
While it is expected that the generated Hibernate Search static metamodel will contain more precise field references that would match the actual field capabilities, this generic reference can be used by the users if they decide to opt-out of using the generated static metamodel and would just want to create a few simple pre-defined references.
-
Constructor Summary
ConstructorsConstructorDescriptionAnyAggregationReference(String absolutePath, Class<SR> scopeRootType, ValueModel valueModel, Class<T> aggregationType) Creates an instance of aAnyAggregationReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theabsolutePathrecord component.Returns the value of theaggregationTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thescopeRootTyperecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalueModelrecord component.
-
Constructor Details
-
AnyAggregationReference
public AnyAggregationReference(String absolutePath, Class<SR> scopeRootType, ValueModel valueModel, Class<T> aggregationType) Creates an instance of aAnyAggregationReferencerecord class.- Parameters:
absolutePath- the value for theabsolutePathrecord componentscopeRootType- the value for thescopeRootTyperecord componentvalueModel- the value for thevalueModelrecord componentaggregationType- the value for theaggregationTyperecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
absolutePath
Returns the value of theabsolutePathrecord component.- Specified by:
absolutePathin interfaceFieldReference<SR>- Returns:
- the value of the
absolutePathrecord component
-
scopeRootType
Returns the value of thescopeRootTyperecord component.- Specified by:
scopeRootTypein interfaceFieldReference<SR>- Returns:
- the value of the
scopeRootTyperecord component
-
valueModel
Returns the value of thevalueModelrecord component.- Specified by:
valueModelin interfaceTypedAggregationFieldReference<SR,T> - Returns:
- the value of the
valueModelrecord component
-
aggregationType
Returns the value of theaggregationTyperecord component.- Specified by:
aggregationTypein interfaceTypedAggregationFieldReference<SR,T> - Returns:
- the value of the
aggregationTyperecord component
-