Record Class RecordResponseVO<T>
java.lang.Object
java.lang.Record
com.dataset.service.model.response.RecordResponseVO<T>
- Type Parameters:
T
-- Record Components:
message
- This is the success message for the specified query or creation.sortedRecords
- This field holds the sorted records for the given dataset.groupedRecords
- This field holds the grouped records for the given dataset.records
- All records with no grouping and sorting.
public record RecordResponseVO<T>(String message, T sortedRecords, T groupedRecords, T records)
extends Record
This is the generic response class for retrieving records from the dataset.
This record is used to return data for various query types — such as all records, grouped records, sorted records,
or a combination — along with an optional message.
-
Constructor Summary
ConstructorsConstructorDescriptionRecordResponseVO
(String message, T sortedRecords, T groupedRecords, T records) Creates an instance of aRecordResponseVO
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegroupedRecords
record component.final int
hashCode()
Returns a hash code value for this object.message()
Returns the value of themessage
record component.records()
Returns the value of therecords
record component.Returns the value of thesortedRecords
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
RecordResponseVO
Creates an instance of aRecordResponseVO
record class.- Parameters:
message
- the value for themessage
record componentsortedRecords
- the value for thesortedRecords
record componentgroupedRecords
- the value for thegroupedRecords
record componentrecords
- the value for therecords
record 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)
. -
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
sortedRecords
Returns the value of thesortedRecords
record component.- Returns:
- the value of the
sortedRecords
record component
-
groupedRecords
Returns the value of thegroupedRecords
record component.- Returns:
- the value of the
groupedRecords
record component
-
records
Returns the value of therecords
record component.- Returns:
- the value of the
records
record component
-