Package com.jalios.jcms.db
Class PageResult<E>
- java.lang.Object
-
- com.jalios.jcms.db.PageResult<E>
-
- Type Parameters:
E
- any object type
public class PageResult<E> extends java.lang.Object
This class contains the result of a paged query (i.e. the sliced result list and total size of the query).- Since:
- jcms-6.0.0
- Author:
- Olivier Dedieu
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PageResult.Status
-
Constructor Summary
Constructors Constructor Description PageResult()
Builds a new empty PageResultsPageResult(int totalSize, boolean isTotalAccurate, boolean hasMoreElements, PageResult.Status status)
PageResult(int totalSize, boolean isTotalAccurate, PageResult.Status status)
PageResult(int totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap)
PageResult(int totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, boolean hasMoreElements, PageResult.Status status)
PageResult(int totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, PageResult.Status status)
PageResult(int totalSize, boolean isTotalAccurate, java.util.List<E> resultList)
PageResult(int totalSize, boolean isTotalAccurate, java.util.List<E> resultList, boolean hasMoreElements, PageResult.Status status)
PageResult(int totalSize, boolean isTotalAccurate, java.util.List<E> resultList, PageResult.Status status)
PageResult(long totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap)
PageResult(long totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, boolean hasMoreElements, PageResult.Status status)
PageResult(long totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, PageResult.Status status)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<E>
getResultList()
float
getScore(E obj)
PageResult.Status
getStatus()
int
getTotalSize()
long
getTotalSizeLong()
Retrieve total page size as long valueboolean
hasMoreElements()
boolean
isTotalAccurate()
void
setHasMoreElements(boolean hasMoreElements)
void
setResultList(java.util.List<E> resultList)
void
setStatus(PageResult.Status status)
void
setTotalAccurate(boolean isTotalAccurate)
void
setTotalSize(int totalSize)
void
setTotalSize(long totalSize)
-
-
-
Constructor Detail
-
PageResult
public PageResult()
Builds a new empty PageResults
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, PageResult.Status status)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, boolean hasMoreElements, PageResult.Status status)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, java.util.List<E> resultList)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, java.util.List<E> resultList, PageResult.Status status)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, java.util.List<E> resultList, boolean hasMoreElements, PageResult.Status status)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, PageResult.Status status)
-
PageResult
public PageResult(int totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, boolean hasMoreElements, PageResult.Status status)
-
PageResult
public PageResult(long totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap)
- Since:
- 10.0.8 / JCMS-10474
-
PageResult
public PageResult(long totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, PageResult.Status status)
- Since:
- 10.0.8 / JCMS-10474
-
PageResult
public PageResult(long totalSize, boolean isTotalAccurate, java.util.LinkedHashMap<E,java.lang.Float> resultMap, boolean hasMoreElements, PageResult.Status status)
- Since:
- 10.0.8 / JCMS-10474
-
-
Method Detail
-
getTotalSize
public int getTotalSize()
-
setTotalSize
public void setTotalSize(int totalSize)
-
getTotalSizeLong
public long getTotalSizeLong()
Retrieve total page size as long value- Since:
- 10.0.8 / JCMS-10474
-
setTotalSize
public void setTotalSize(long totalSize)
- Parameters:
totalSize
- the total result size- Since:
- 10.0.8 / JCMS-10474
-
getResultList
public java.util.List<E> getResultList()
-
setResultList
public void setResultList(java.util.List<E> resultList)
-
getScore
public float getScore(E obj)
-
setStatus
public void setStatus(PageResult.Status status)
-
getStatus
public PageResult.Status getStatus()
-
isTotalAccurate
public boolean isTotalAccurate()
-
setTotalAccurate
public void setTotalAccurate(boolean isTotalAccurate)
-
hasMoreElements
public boolean hasMoreElements()
-
setHasMoreElements
public void setHasMoreElements(boolean hasMoreElements)
-
-