|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.loom.paged.PagedListDataFactory
public class PagedListDataFactory
Constructor Summary | |
---|---|
PagedListDataFactory()
|
Method Summary | ||
---|---|---|
static
|
convert(PagedListData<T1> sourceData,
com.google.common.base.Function<T1,T2> function)
Convert the data of one PagedListData into another PagedListData instance, transforming the list contents. |
|
static
|
create(java.util.List<T> list,
java.util.Comparator<T> comparator,
PagedListCriteria criteria)
Creates a data object according to the provided criteria |
|
static
|
create(PagedListCriteria criteria)
Creates a data object according to the provided criteria |
|
static
|
create(PagedListCriteria criteria,
java.util.List<T> list)
Creates a data object Note that this method is (relatively) inefficient and sorting and paging should be done by the backend instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PagedListDataFactory()
Method Detail |
---|
public static <T> PagedListData<T> create(PagedListCriteria criteria)
criteria
- the criteria object, where page index, sorting etc will be extracted from.
PagedListData
instance with the same properties of the provided criteria objectpublic static <T> PagedListData<T> create(PagedListCriteria criteria, java.util.List<T> list)
criteria
- the criteria object, where page index, sorting etc will be extracted from.list
- the entire list of results. It will be sorted and the current page will be extracted from it.
PagedListData
instance with the same properties of the provided criteria object, and the
contents of the current page extracted from the provided list.public static <T> PagedListData<T> create(java.util.List<T> list, java.util.Comparator<T> comparator, PagedListCriteria criteria)
T
- the type of each record objectlist
- the entire list of results. Pagination and ordering will be applied on this.comparator
- the Comparator to do the sorting. If null, no sort will be performedcriteria
- The pagination, sorting properties, etc.
public static <T1,T2> PagedListData<T2> convert(PagedListData<T1> sourceData, com.google.common.base.Function<T1,T2> function)
T1
- The type of the source list contentsT2
- The type of the destination list contentssourceData
- the PagedListData that will be transformedfunction
- the function that will transform each item
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |