com.linkedin.restli.common
Class CollectionResponse<T extends com.linkedin.data.template.RecordTemplate>
java.lang.Object
com.linkedin.data.template.RecordTemplate
com.linkedin.restli.common.CollectionResponse<T>
- All Implemented Interfaces:
- com.linkedin.data.template.DataTemplate<com.linkedin.data.DataMap>, java.lang.Cloneable
public class CollectionResponse<T extends com.linkedin.data.template.RecordTemplate>
- extends com.linkedin.data.template.RecordTemplate
A Collection of records. Used for returning an ordered, variable-length, navigable collection of resources.
|
Constructor Summary |
CollectionResponse(java.lang.Class<T> elementClass)
Initialize a CollectionResponse based on the type of elements it returns. |
CollectionResponse(com.linkedin.data.DataMap data,
java.lang.Class<T> elementClass)
Initialize a CollectionResponse based on the given dataMap and the
elements it returns. |
| Methods inherited from class com.linkedin.data.template.RecordTemplate |
clone, contains, copy, data, equals, hashCode, obtainDirect, obtainWrapped, putDirect, putDirect, putDirect, putWrapped, putWrapped, remove, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ELEMENTS
public static final java.lang.String ELEMENTS
- See Also:
- Constant Field Values
METADATA
public static final java.lang.String METADATA
- See Also:
- Constant Field Values
CollectionResponse
public CollectionResponse(java.lang.Class<T> elementClass)
- Initialize a CollectionResponse based on the type of elements it returns.
- Parameters:
elementClass - the class of the elements returned
CollectionResponse
public CollectionResponse(com.linkedin.data.DataMap data,
java.lang.Class<T> elementClass)
- Initialize a CollectionResponse based on the given dataMap and the
elements it returns.
- Parameters:
data - a DataMapelementClass - the class of the elements returned
schema
public com.linkedin.data.schema.RecordDataSchema schema()
- Specified by:
schema in interface com.linkedin.data.template.DataTemplate<com.linkedin.data.DataMap>- Overrides:
schema in class com.linkedin.data.template.RecordTemplate
getElements
public java.util.List<T> getElements()
hasPaging
public boolean hasPaging()
removePaging
public void removePaging()
getPaging
public CollectionMetadata getPaging()
setPaging
public void setPaging(CollectionMetadata value)
setMetadataRaw
public void setMetadataRaw(com.linkedin.data.DataMap metadata)
getMetadataRaw
public com.linkedin.data.DataMap getMetadataRaw()