Record Class ResourceWriteOptions
Carries the per-write document envelope (top-level links, meta, and JSON:API object) together
with the per-operation representation selection (include paths and sparse fieldsets). An absent
per-write jsonapi member (a null component on the envelope) is distinct from an explicit
per-write JsonApiObject: explicit values override the
configured application-lifetime document default, while absence leaves that default in effect.
Representation policy is application/runtime configuration owned by the major-specific runtime, not a per-write value: these options deliberately carry no policy, so a default write always inherits the runtime's effective policy instead of overriding it with a concrete default. Per-call policy overrides remain advanced.
Use defaults() for the documented ordinary behavior: no document-level members and no
inclusion or fieldsets.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceWriteOptions(DocumentEnvelope envelope, RepresentationSelection selection) Creates an instance of aResourceWriteOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceWriteOptionsdefaults()Returns options with no envelope members and no selection.envelope()Returns the value of theenveloperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theselectionrecord component.final StringtoString()Returns a string representation of this record class.withEnvelope(DocumentEnvelope envelope) Returns options with the given envelope and this selection.withSelection(RepresentationSelection selection) Returns options with the given selection and this envelope.
-
Constructor Details
-
ResourceWriteOptions
Creates an instance of aResourceWriteOptionsrecord class.- Parameters:
envelope- the value for theenveloperecord componentselection- the value for theselectionrecord component
-
-
Method Details
-
defaults
Returns options with no envelope members and no selection. -
withEnvelope
Returns options with the given envelope and this selection. -
withSelection
Returns options with the given selection and this envelope. -
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). -
envelope
Returns the value of theenveloperecord component.- Returns:
- the value of the
enveloperecord component
-
selection
Returns the value of theselectionrecord component.- Returns:
- the value of the
selectionrecord component
-