Package overit.geocall.model
Class Page
java.lang.Object
overit.geocall.model.DynO
overit.geocall.model.Page
- All Implemented Interfaces:
ConstraintValidator<DynO.Valid,,DynO> Serializable,overit.geocall.timezone.model.TimeZoned
Bean containing the paging information. This is usually used as a query param of a service to
retrieve a specific page from a result's collection.
- Since:
- 9.0
- See Also:
- GCApi:
- dto
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.model.DynO
DynO.SpanFields, DynO.SpanTable, DynO.Valid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the page number or 0 if no value has been defined.final intgetSize()Returns the max number of the elements that a page can contain.final intmaxRows()Gets the maximum number of rows to search.final intskipRows()Return the number of rows that must be skipped for the queries.Methods inherited from class overit.geocall.model.DynO
addExtension, extract, extract, fields, from, from, getCriteria, getCriteriaNotExploded, getExtension, getFakeFilter, getUnknownAttributes, getUnknownCriteria, getVariant, getZone, insert, insert, isValid, make, removeCriteria, removeExtensionAttribute, setCriteria, setCriteriaNotExploded, setExtension, setFakeFilter, setUnknownAttributes, setUnknownCriteria, setVariant, setZone, toFlatMap, toFlatMap, toMap, toMap, toString, update, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.validation.ConstraintValidator
initializeMethods inherited from interface overit.geocall.timezone.model.TimeZoned
hasZone
-
Constructor Details
-
Page
Creates a new page indicating its number and the max number of the elements that can contains.- Parameters:
num- the page number.size- the max number of the elements that a page can contain.
-
Page
Represents a page with a specified size and number.- Parameters:
pageSize- The size of the page (S, M, or L).num- The number of the page.size- The maximum number of elements that the page can contain.
-
-
Method Details
-
getNumber
public final int getNumber()Returns the page number or 0 if no value has been defined.- Returns:
- the page number.
-
getSize
public final int getSize()Returns the max number of the elements that a page can contain.- Returns:
- the max number of the elements that a page can contain.
-
maxRows
public final int maxRows()Gets the maximum number of rows to search. This value should be commonly passed to theCommandContext.setMaxRows(int)method.- Returns:
- the maximum number of rows to search
-
skipRows
public final int skipRows()Return the number of rows that must be skipped for the queries. This value should be commonly passed to theCommandContext.setSkipRows(int)method.- Returns:
- the number of rows that must be skipped for the queries
-