ccc.api.core
Class PagedCollection<T>

java.lang.Object
  extended by ccc.api.core.Res
      extended by ccc.api.core.PagedCollection<T>
Type Parameters:
T - The type of the elements.
All Implemented Interfaces:
java.io.Serializable

public class PagedCollection<T>
extends Res

Wrapper class for a collection of DTOs.

Author:
Civic Computing Ltd.
See Also:
Serialized Form

Constructor Summary
PagedCollection(java.lang.Class<T> elementClass)
          Constructor.
PagedCollection(long totalCount, java.lang.Class<T> elementClass, java.util.List<T> elements)
          Constructor.
 
Method Summary
 java.lang.Class<T> getElementClass()
          Accessor.
 java.util.List<T> getElements()
          Accessor.
 long getTotalCount()
          Accessor.
 
Methods inherited from class ccc.api.core.Res
addLink, addLinks, getLink, getLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagedCollection

public PagedCollection(long totalCount,
                       java.lang.Class<T> elementClass,
                       java.util.List<T> elements)
Constructor.

Parameters:
totalCount - The total number of elements in the collection.
elementClass - The type of collection to create.
elements - The elements on the current page.

PagedCollection

public PagedCollection(java.lang.Class<T> elementClass)
Constructor.

Parameters:
elementClass - The type of collection to create.
Method Detail

getTotalCount

public final long getTotalCount()
Accessor.

Returns:
Returns the total count.

getElements

public final java.util.List<T> getElements()
Accessor.

Returns:
Returns the elements.

getElementClass

public java.lang.Class<T> getElementClass()
Accessor.

Returns:
Returns the elementClass.


Copyright © 2010. All Rights Reserved.