Package com.kazforge.jsonapi.patch
Record Class StructuredMember
java.lang.Object
java.lang.Record
com.kazforge.jsonapi.patch.StructuredMember
public record StructuredMember(String wireName, String logicalName, StructuredMemberState state)
extends Record
Backend-independent supplied nested member of a
StructuredPatch. The current Jackson
adapters populate it through caller-configured Jackson.
Both names are carried because they serve different purposes: wireName() is the final
JSON:API document member name (used for wire lookup and diagnostics), and logicalName()
is the logical application-property identity on the application type (used for
application-property correspondence). Configured Jackson performs the translation between the
logical identity and the final member name via its external property name; there is deliberately
no single ambiguous name field and no third external-name field.
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredMember(String wireName, String logicalName, StructuredMemberState state) Creates an instance of aStructuredMemberrecord class. -
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 value of thelogicalNamerecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.wireName()Returns the value of thewireNamerecord component.
-
Constructor Details
-
StructuredMember
Creates an instance of aStructuredMemberrecord class.- Parameters:
wireName- the value for thewireNamerecord componentlogicalName- the value for thelogicalNamerecord componentstate- the value for thestaterecord 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). -
wireName
Returns the value of thewireNamerecord component.- Returns:
- the value of the
wireNamerecord component
-
logicalName
Returns the value of thelogicalNamerecord component.- Returns:
- the value of the
logicalNamerecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-