com.linkedin.restli.common
Class CollectionRequest<T extends com.linkedin.data.template.RecordTemplate>

java.lang.Object
  extended by com.linkedin.data.template.RecordTemplate
      extended by com.linkedin.restli.common.CollectionRequest<T>
All Implemented Interfaces:
com.linkedin.data.template.DataTemplate<com.linkedin.data.DataMap>, java.lang.Cloneable

public class CollectionRequest<T extends com.linkedin.data.template.RecordTemplate>
extends com.linkedin.data.template.RecordTemplate


Field Summary
static java.lang.String ELEMENTS
           
 
Constructor Summary
CollectionRequest(java.lang.Class<T> elementClass)
          Initialize a CollectionRequest based on the given elementClass.
CollectionRequest(com.linkedin.data.DataMap data, java.lang.Class<T> elementClass)
          Initialize a CollectionRequest based on the given data and elementClass.
 
Method Summary
 java.util.List<T> getElements()
          Return a mutable list of elements that can be added to as the collection.
 com.linkedin.data.schema.RecordDataSchema schema()
           
 
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
 

Field Detail

ELEMENTS

public static final java.lang.String ELEMENTS
See Also:
Constant Field Values
Constructor Detail

CollectionRequest

public CollectionRequest(java.lang.Class<T> elementClass)
Initialize a CollectionRequest based on the given elementClass.

Parameters:
elementClass - the class of items that will be returned when this request is fulfilled

CollectionRequest

public CollectionRequest(com.linkedin.data.DataMap data,
                         java.lang.Class<T> elementClass)
Initialize a CollectionRequest based on the given data and elementClass.

Parameters:
data - a DataMap
elementClass - the class of items that will be returned when this request is fulfilled
Method Detail

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()
Return a mutable list of elements that can be added to as the collection. request is fulfilled.

Returns:
mutable List of elements