Record Class CollectionHydrator.FetchResult
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.projection.impl.CollectionHydrator.FetchResult
- Enclosing class:
CollectionHydrator
public static record CollectionHydrator.FetchResult(List<Object[]> rows, List<Class<?>> joinTypes)
extends Record
Result returned by the
CollectionHydrator.RowFetcher containing the fetched rows and
the Java types of the joined associations.-
Constructor Summary
ConstructorsConstructorDescriptionFetchResult(List<Object[]> rows, List<Class<?>> joinTypes) Constructs a new FetchResult with the given rows and join types. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the Java types of the joined associations as an immutable list.rows()Returns the fetched rows as an immutable list.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FetchResult
Constructs a new FetchResult with the given rows and join types. The lists are copied to ensure immutability.- Parameters:
rows- the fetched rows, where each row is an array of objectsjoinTypes- the Java types of the joined associations
-
-
Method Details
-
rows
Returns the fetched rows as an immutable list. Each row is represented as an array of objects.- Returns:
- an immutable list of rows
-
joinTypes
Returns the Java types of the joined associations as an immutable list. This is useful for determining the types of nested DTOs that need to be hydrated recursively.- Returns:
- an immutable list of join types
-
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).
-