Record Class EntityResultSegment
java.lang.Object
java.lang.Record
org.apache.cayenne.query.EntityResultSegment
- Record Components:
classDescriptor- a descriptor of the entity mapped by this segmentfields- a map of ResultSet labels keyed by column paths. Note that ordering of fields in the map is generally undefined and should not be relied upon when processing query result sets.columnOffset- a zero-based column index of the first column of this segment in the ResultSet
- All Implemented Interfaces:
ResultSegment
public record EntityResultSegment(ClassDescriptor classDescriptor, Map<String,String> fields, int columnOffset)
extends Record
implements ResultSegment
A "compiled" version of a
EntityResult descriptor.- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionEntityResultSegment(ClassDescriptor classDescriptor, Map<String, String> fields, int columnOffset) Creates an instance of aEntityResultSegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassDescriptorrecord component.intReturns the value of thecolumnOffsetrecord component.columnPath(String resultSetLabel) Performs a reverse lookup of the column path for a given ResultSet label.final booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EntityResultSegment
public EntityResultSegment(ClassDescriptor classDescriptor, Map<String, String> fields, int columnOffset) Creates an instance of aEntityResultSegmentrecord class.- Parameters:
classDescriptor- the value for theclassDescriptorrecord componentfields- the value for thefieldsrecord componentcolumnOffset- the value for thecolumnOffsetrecord component
-
-
Method Details
-
columnPath
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
classDescriptor
Returns the value of theclassDescriptorrecord component.- Returns:
- the value of the
classDescriptorrecord component
-
fields
-
columnOffset
public int columnOffset()Returns the value of thecolumnOffsetrecord component.- Specified by:
columnOffsetin interfaceResultSegment- Returns:
- the value of the
columnOffsetrecord component
-