Record Class PagedModel.PageMetadata
java.lang.Object
java.lang.Record
com.broadleafcommerce.search.api.domain.PagedModel.PageMetadata
- Enclosing class:
- PagedModel<T>
public static record PagedModel.PageMetadata(long pageSize, long pageNumber, long offset, boolean paged, boolean unpaged, org.springframework.data.domain.Sort sort)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPageMetadata
(long pageSize, long pageNumber, long offset, boolean paged, boolean unpaged, org.springframework.data.domain.Sort sort) Creates an instance of aPageMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
offset()
Returns the value of theoffset
record component.boolean
paged()
Returns the value of thepaged
record component.long
Returns the value of thepageNumber
record component.long
pageSize()
Returns the value of thepageSize
record component.org.springframework.data.domain.Sort
sort()
Returns the value of thesort
record component.final String
toString()
Returns a string representation of this record class.boolean
unpaged()
Returns the value of theunpaged
record component.
-
Constructor Details
-
PageMetadata
public PageMetadata(long pageSize, long pageNumber, long offset, boolean paged, boolean unpaged, org.springframework.data.domain.Sort sort) Creates an instance of aPageMetadata
record class.- Parameters:
pageSize
- the value for thepageSize
record componentpageNumber
- the value for thepageNumber
record componentoffset
- the value for theoffset
record componentpaged
- the value for thepaged
record componentunpaged
- the value for theunpaged
record componentsort
- the value for thesort
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
pageSize
public long pageSize()Returns the value of thepageSize
record component.- Returns:
- the value of the
pageSize
record component
-
pageNumber
public long pageNumber()Returns the value of thepageNumber
record component.- Returns:
- the value of the
pageNumber
record component
-
offset
public long offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-
paged
public boolean paged()Returns the value of thepaged
record component.- Returns:
- the value of the
paged
record component
-
unpaged
public boolean unpaged()Returns the value of theunpaged
record component.- Returns:
- the value of the
unpaged
record component
-
sort
public org.springframework.data.domain.Sort sort()Returns the value of thesort
record component.- Returns:
- the value of the
sort
record component
-