Record Class ResourceCollectionDocument<T>
resources() is always the present primary data array in wire order; an empty
list preserves "data": [] and never means absent data. For nullable document-level
components, Java null means the member was absent; in particular, a non-null empty
included list preserves "included": [].
Included resources are carried as validated core ResourceObject values, never bound to
DTOs: included state may be heterogeneous while this path stays homogeneous and registry-free.
Included resources are never hydrated into relationship properties. The result is returned only
after complete document validation. Error documents, identifier primary data, and additional
document members are not carried; reads requiring those states use the documents facet or an
advanced envelope instead.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceCollectionDocument(List<T> resources, @Nullable com.kazforge.jsonapi.core.model.Meta meta, @Nullable com.kazforge.jsonapi.core.model.Links links, @Nullable com.kazforge.jsonapi.core.model.JsonApiObject jsonapi, @Nullable List<com.kazforge.jsonapi.core.model.ResourceObject> included) Creates an instance of aResourceCollectionDocumentrecord 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.@Nullable List<com.kazforge.jsonapi.core.model.ResourceObject> included()Returns the value of theincludedrecord component.@Nullable com.kazforge.jsonapi.core.model.JsonApiObjectjsonapi()Returns the value of thejsonapirecord component.@Nullable com.kazforge.jsonapi.core.model.Linkslinks()Returns the value of thelinksrecord component.@Nullable com.kazforge.jsonapi.core.model.Metameta()Returns the value of themetarecord component.Returns the value of theresourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceCollectionDocument
public ResourceCollectionDocument(List<T> resources, @Nullable com.kazforge.jsonapi.core.model.Meta meta, @Nullable com.kazforge.jsonapi.core.model.Links links, @Nullable com.kazforge.jsonapi.core.model.JsonApiObject jsonapi, @Nullable List<com.kazforge.jsonapi.core.model.ResourceObject> included) Creates an instance of aResourceCollectionDocumentrecord class.- Parameters:
resources- the value for theresourcesrecord componentmeta- the value for themetarecord componentlinks- the value for thelinksrecord componentjsonapi- the value for thejsonapirecord componentincluded- the value for theincludedrecord 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). -
resources
Returns the value of theresourcesrecord component.- Returns:
- the value of the
resourcesrecord component
-
meta
public @Nullable com.kazforge.jsonapi.core.model.Meta meta()Returns the value of themetarecord component.- Returns:
- the value of the
metarecord component
-
links
public @Nullable com.kazforge.jsonapi.core.model.Links links()Returns the value of thelinksrecord component.- Returns:
- the value of the
linksrecord component
-
jsonapi
public @Nullable com.kazforge.jsonapi.core.model.JsonApiObject jsonapi()Returns the value of thejsonapirecord component.- Returns:
- the value of the
jsonapirecord component
-
included
Returns the value of theincludedrecord component.- Returns:
- the value of the
includedrecord component
-