Package net.n2oapp.platform.jaxrs
Class RestCriteria
- java.lang.Object
-
- net.n2oapp.platform.jaxrs.RestCriteria
-
- All Implemented Interfaces:
org.springframework.data.domain.Pageable
public abstract class RestCriteria extends Object implements org.springframework.data.domain.Pageable
Универсальный способ передачи параметров фильтрации, паджинации и сортировки в REST запросе
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PAGE_NUMBERstatic intDEFAULT_PAGE_SIZEstatic intFIRST_PAGE_NUMBERstatic intMIN_PAGE_SIZE
-
Constructor Summary
Constructors Constructor Description RestCriteria()RestCriteria(int pageNumber, int pageSize)RestCriteria(int pageNumber, int pageSize, org.springframework.data.domain.Sort sort)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)RestCriteriafirst()protected abstract List<org.springframework.data.domain.Sort.Order>getDefaultOrders()longgetOffset()intgetPageNumber()intgetPageSize()org.springframework.data.domain.SortgetSort()inthashCode()booleanhasPrevious()booleanisPaged()booleanisUnpaged()RestCriterianext()RestCriteriaprevious()RestCriteriapreviousOrFirst()voidsetOrders(List<org.springframework.data.domain.Sort.Order> orders)voidsetPageNumber(int pageNumber)voidsetPageSize(int pageSize)
-
-
-
Field Detail
-
FIRST_PAGE_NUMBER
public static final int FIRST_PAGE_NUMBER
- See Also:
- Constant Field Values
-
MIN_PAGE_SIZE
public static final int MIN_PAGE_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_PAGE_NUMBER
public static final int DEFAULT_PAGE_NUMBER
- See Also:
- Constant Field Values
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPageSize
public int getPageSize()
- Specified by:
getPageSizein interfaceorg.springframework.data.domain.Pageable
-
getPageNumber
public int getPageNumber()
- Specified by:
getPageNumberin interfaceorg.springframework.data.domain.Pageable
-
getOffset
public long getOffset()
- Specified by:
getOffsetin interfaceorg.springframework.data.domain.Pageable
-
getSort
public org.springframework.data.domain.Sort getSort()
- Specified by:
getSortin interfaceorg.springframework.data.domain.Pageable
-
getDefaultOrders
protected abstract List<org.springframework.data.domain.Sort.Order> getDefaultOrders()
-
setPageNumber
public void setPageNumber(int pageNumber)
-
setPageSize
public void setPageSize(int pageSize)
-
setOrders
public void setOrders(List<org.springframework.data.domain.Sort.Order> orders)
-
next
public RestCriteria next()
- Specified by:
nextin interfaceorg.springframework.data.domain.Pageable
-
previous
public RestCriteria previous()
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfaceorg.springframework.data.domain.Pageable
-
previousOrFirst
public RestCriteria previousOrFirst()
- Specified by:
previousOrFirstin interfaceorg.springframework.data.domain.Pageable
-
first
public RestCriteria first()
- Specified by:
firstin interfaceorg.springframework.data.domain.Pageable
-
isPaged
public boolean isPaged()
- Specified by:
isPagedin interfaceorg.springframework.data.domain.Pageable
-
isUnpaged
public boolean isUnpaged()
- Specified by:
isUnpagedin interfaceorg.springframework.data.domain.Pageable
-
-