Record Class PageResult<T>
java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.persistence.query.PageResult<T>
-
Constructor Summary
ConstructorsConstructorDescriptionPageResult(List<T> items, int page, int size, long total, long totalPages) Creates an instance of aPageResultrecord 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.items()Returns the value of theitemsrecord component.intpage()Returns the value of thepagerecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.longtotal()Returns the value of thetotalrecord component.longReturns the value of thetotalPagesrecord component.
-
Constructor Details
-
PageResult
Creates an instance of aPageResultrecord class.- Parameters:
items- the value for theitemsrecord componentpage- the value for thepagerecord componentsize- the value for thesizerecord componenttotal- the value for thetotalrecord componenttotalPages- the value for thetotalPagesrecord component
-
-
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
-
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
total
public long total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
totalPages
public long totalPages()Returns the value of thetotalPagesrecord component.- Returns:
- the value of the
totalPagesrecord component
-