Record Class NuggetIntrospection.CollectionResult<T>
java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetIntrospection.CollectionResult<T>
- Type Parameters:
T- item type- Record Components:
items- returned itemsoffset- applied offsetlimit- applied limitreturned- returned item counttotalAvailable- total authorized count, or-1when hiddentotalAvailableAuthorized- whether totalAvailable is authorizedsortedBy- applied sort fielddirection- applied sort directionfilters- applied filterscollectedAt- collection timestamppartial- whether provider data was partialmetadata- safe metadata
- Enclosing class:
NuggetIntrospection
public static record NuggetIntrospection.CollectionResult<T>(List<T> items, int offset, int limit, int returned, int totalAvailable, boolean totalAvailableAuthorized, String sortedBy, NuggetIntrospection.SortDirection direction, Map<String,String> filters, Instant collectedAt, boolean partial, Map<String,String> metadata)
extends Record
Bounded collection result.
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionResult(List<T> items, int offset, int limit, int returned, int totalAvailable, boolean totalAvailableAuthorized, String sortedBy, NuggetIntrospection.SortDirection direction, Map<String, String> filters, Instant collectedAt, boolean partial, Map<String, String> metadata) Creates immutable collection metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecollectedAtrecord component.Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.filters()Returns the value of thefiltersrecord component.final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.intlimit()Returns the value of thelimitrecord component.metadata()Returns the value of themetadatarecord component.intoffset()Returns the value of theoffsetrecord component.booleanpartial()Returns the value of thepartialrecord component.intreturned()Returns the value of thereturnedrecord component.sortedBy()Returns the value of thesortedByrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalAvailablerecord component.booleanReturns the value of thetotalAvailableAuthorizedrecord component.
-
Constructor Details
-
CollectionResult
public CollectionResult(List<T> items, int offset, int limit, int returned, int totalAvailable, boolean totalAvailableAuthorized, String sortedBy, NuggetIntrospection.SortDirection direction, Map<String, String> filters, Instant collectedAt, boolean partial, Map<String, String> metadata) Creates immutable collection metadata.
-
-
Method Details
-
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. -
items
-
offset
-
limit
-
returned
-
totalAvailable
public int totalAvailable()Returns the value of thetotalAvailablerecord component.- Returns:
- the value of the
totalAvailablerecord component
-
totalAvailableAuthorized
public boolean totalAvailableAuthorized()Returns the value of thetotalAvailableAuthorizedrecord component.- Returns:
- the value of the
totalAvailableAuthorizedrecord component
-
sortedBy
-
direction
-
filters
-
collectedAt
Returns the value of thecollectedAtrecord component.- Returns:
- the value of the
collectedAtrecord component
-
partial
-
metadata
-