Class DefaultNarrowedPageable
java.lang.Object
com.broadleafcommerce.data.tracking.core.filtering.DefaultUnnumberedPageable
com.broadleafcommerce.data.tracking.core.filtering.DefaultNarrowedPageable
- All Implemented Interfaces:
NarrowedPageable
,UnnumberedPageable
,Serializable
,org.springframework.data.domain.Pageable
- Author:
- Jeff Fischer
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
DefaultNarrowedPageable
(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort) protected
DefaultNarrowedPageable
(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort, int underlyingPageSize) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Pageable
first()
int
The number of physical database records processed.boolean
boolean
Whether or not the current NarrowedPageable request represents a forward progression, or a backwards progression.org.springframework.data.domain.Pageable
next()
static DefaultNarrowedPageable
of
(long offset, int size) static DefaultNarrowedPageable
of
(long offset, int size, boolean isForward) static DefaultNarrowedPageable
of
(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort) static DefaultNarrowedPageable
of
(long offset, int size, boolean isForward, org.springframework.data.domain.Sort.Direction direction, String... properties) static DefaultNarrowedPageable
of
(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort, int underlyingPageSize) static DefaultNarrowedPageable
of
(long offset, int size, org.springframework.data.domain.Sort sort) static DefaultUnnumberedPageable
of
(long offset, int size, org.springframework.data.domain.Sort.Direction direction, String... properties) org.springframework.data.domain.Pageable
void
setUnderlyingPageSize
(int underlyingPageSize) The number of physical database records processed.Methods inherited from class com.broadleafcommerce.data.tracking.core.filtering.DefaultUnnumberedPageable
getOffset, getPageSize, getSort, withPage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.domain.Pageable
getOffset, getPageSize, getSort, getSortOr, isPaged, isUnpaged, toOptional, toScrollPosition, withPage
Methods inherited from interface com.broadleafcommerce.data.tracking.core.filtering.UnnumberedPageable
getPageNumber
-
Constructor Details
-
DefaultNarrowedPageable
protected DefaultNarrowedPageable(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort, int underlyingPageSize) -
DefaultNarrowedPageable
protected DefaultNarrowedPageable(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort)
-
-
Method Details
-
of
-
of
public static DefaultNarrowedPageable of(long offset, int size, org.springframework.data.domain.Sort sort) -
of
public static DefaultUnnumberedPageable of(long offset, int size, org.springframework.data.domain.Sort.Direction direction, String... properties) -
of
-
of
public static DefaultNarrowedPageable of(long offset, int size, boolean isForward, org.springframework.data.domain.Sort.Direction direction, String... properties) -
of
public static DefaultNarrowedPageable of(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort) -
of
public static DefaultNarrowedPageable of(long offset, int size, boolean isForward, org.springframework.data.domain.Sort sort, int underlyingPageSize) -
next
public org.springframework.data.domain.Pageable next()- Specified by:
next
in interfaceorg.springframework.data.domain.Pageable
- Overrides:
next
in classDefaultUnnumberedPageable
-
previousOrFirst
public org.springframework.data.domain.Pageable previousOrFirst()- Specified by:
previousOrFirst
in interfaceorg.springframework.data.domain.Pageable
- Overrides:
previousOrFirst
in classDefaultUnnumberedPageable
-
first
public org.springframework.data.domain.Pageable first()- Specified by:
first
in interfaceorg.springframework.data.domain.Pageable
- Overrides:
first
in classDefaultUnnumberedPageable
-
getUnderlyingPageSize
public int getUnderlyingPageSize()Description copied from interface:NarrowedPageable
The number of physical database records processed. This can be different than the narrowed records returned in a page.- Specified by:
getUnderlyingPageSize
in interfaceNarrowedPageable
- Returns:
- The number of physical database records processed
-
setUnderlyingPageSize
public void setUnderlyingPageSize(int underlyingPageSize) Description copied from interface:NarrowedPageable
The number of physical database records processed. This can be different than the narrowed records returned in a page in the case of a query against items that need to be narrowed. In the case of a query that is not being narrowed, this will always be equal toPageable.getPageSize()
- Specified by:
setUnderlyingPageSize
in interfaceNarrowedPageable
- Parameters:
underlyingPageSize
- The number of physical database records processed
-
isForward
public boolean isForward()Description copied from interface:NarrowedPageable
Whether or not the current NarrowedPageable request represents a forward progression, or a backwards progression.- Specified by:
isForward
in interfaceNarrowedPageable
- Returns:
- Whether or not the response page records should be in advance of the offset, or behind the offset.
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceorg.springframework.data.domain.Pageable
- Overrides:
hasPrevious
in classDefaultUnnumberedPageable
-