public class CollectionWithPagingInfo<T> extends Object implements SerializablePagedCollection
Modifier | Constructor and Description |
---|---|
protected |
CollectionWithPagingInfo(Collection<T> collection,
Paging paging,
boolean hasMoreItems,
Integer totalItems,
Object sourceEntity,
SearchContext context)
Constructs a new CollectionWithPagingInfo.
|
Modifier and Type | Method and Description |
---|---|
static <T> CollectionWithPagingInfo<T> |
asPaged(Paging paging,
Collection<T> aCollection)
Constructs a new CollectionWithPagingInfo.
|
static <T> CollectionWithPagingInfo<T> |
asPaged(Paging paging,
Collection<T> aCollection,
boolean hasMoreItems,
Integer totalItems)
Constructs a new CollectionWithPagingInfo.
|
static <T> CollectionWithPagingInfo<T> |
asPaged(Paging paging,
Collection<T> aCollection,
boolean hasMoreItems,
Integer totalItems,
Object sourceEntity)
Constructs a new CollectionWithPagingInfo.
|
static <T> CollectionWithPagingInfo<T> |
asPaged(Paging paging,
Collection<T> aCollection,
boolean hasMoreItems,
Integer totalItems,
Object sourceEntity,
SearchContext context)
Constructs a new CollectionWithPagingInfo.
|
static <T> CollectionWithPagingInfo<T> |
asPagedCollection(T... entity)
Constructs a new CollectionWithPagingInfo using a number of entity values.
|
Collection<T> |
getCollection()
Returns the Collection object
|
SearchContext |
getContext()
The search context for the collection
|
Paging |
getPaging()
The requested paging parameters set by the client
|
Object |
getSourceEntity()
The parent/source entity responsible for the collection
|
Integer |
getTotalItems()
Indicates the total number of items available.
|
boolean |
hasMoreItems()
Indicates if the returned collection has more items after the current returned list.
|
protected CollectionWithPagingInfo(Collection<T> collection, Paging paging, boolean hasMoreItems, Integer totalItems, Object sourceEntity, SearchContext context)
collection
- - the collection that needs to be paged.paging
- - Paging request infohasMoreItems
- - Are there more items after this Collection?totalItems
- - The total number of items available.public static <T> CollectionWithPagingInfo<T> asPaged(Paging paging, Collection<T> aCollection)
paging
- - Paging request infoaCollection
- - the collection that needs to be paged.public static <T> CollectionWithPagingInfo<T> asPagedCollection(T... entity)
entity
- - the entities to turn into a collectionpublic static <T> CollectionWithPagingInfo<T> asPaged(Paging paging, Collection<T> aCollection, boolean hasMoreItems, Integer totalItems)
paging
- - Paging request infoaCollection
- - the collection that needs to be paged.hasMoreItems
- - Are there more items after this Collection?totalItems
- - The total number of items available.public static <T> CollectionWithPagingInfo<T> asPaged(Paging paging, Collection<T> aCollection, boolean hasMoreItems, Integer totalItems, Object sourceEntity)
paging
- - Paging request infoaCollection
- - the collection that needs to be paged.hasMoreItems
- - Are there more items after this Collection?totalItems
- - The total number of items available.sourceEntity
- - The parent/source entity responsible for the collectionpublic static <T> CollectionWithPagingInfo<T> asPaged(Paging paging, Collection<T> aCollection, boolean hasMoreItems, Integer totalItems, Object sourceEntity, SearchContext context)
paging
- - Paging request infoaCollection
- - the collection that needs to be paged.hasMoreItems
- - Are there more items after this Collection?totalItems
- - The total number of items available.sourceEntity
- - The parent/source entity responsible for the collectioncontext
- - The search contextpublic Collection<T> getCollection()
getCollection
in interface SerializablePagedCollection
public boolean hasMoreItems()
hasMoreItems
in interface SerializablePagedCollection
public Integer getTotalItems()
getTotalItems
in interface SerializablePagedCollection
public Object getSourceEntity()
getSourceEntity
in interface SerializablePagedCollection
public Paging getPaging()
getPaging
in interface SerializablePagedCollection
public SearchContext getContext()
SerializablePagedCollection
getContext
in interface SerializablePagedCollection
Copyright © 2005–2017 Alfresco Software. All rights reserved.