Record Class CompoundMapping
java.lang.Object
java.lang.Record
jakarta.persistence.sql.CompoundMapping
- Record Components:
elements- Mappings for the elements of the tuple
- All Implemented Interfaces:
ResultSetMapping<Object[]>
public record CompoundMapping(MappingElement<?>[] elements)
extends Record
implements ResultSetMapping<Object[]>
Maps a JDBC
ResultSet to a tuple of values
packaged as an object array.- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompoundMapping(MappingElement<?>[] elements) Creates an instance of aCompoundMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionMappingElement<?>[]elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CompoundMappingof(MappingElement<?>... elements) Construct a new instance.final StringtoString()Returns a string representation of this record class.type()Always returnsObject[].class.
-
Constructor Details
-
CompoundMapping
Creates an instance of aCompoundMappingrecord class.- Parameters:
elements- the value for theelementsrecord component
-
-
Method Details
-
of
Construct a new instance.- Parameters:
elements- Mappings for the elements of the tuple
-
type
Always returnsObject[].class.- Specified by:
typein interfaceResultSetMapping<Object[]>
-
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). -
elements
-