com.linkedin.restli.common
Class CollectionMetadata

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

public class CollectionMetadata
extends com.linkedin.data.template.RecordTemplate

Metadata and pagination links for this collection


Constructor Summary
CollectionMetadata()
          Initialize empty CollectionMetadata.
CollectionMetadata(com.linkedin.data.DataMap data)
          Initialize CollectionMetadata based on the given map.
 
Method Summary
 int getCount()
          Get count value of the CollectionMetadata.
 java.lang.Integer getCount(com.linkedin.data.template.GetMode mode)
          Returns the count value of the CollectionMetadata.
 LinkArray getLinks()
          Get the links of the CollectionMetadata.
 LinkArray getLinks(com.linkedin.data.template.GetMode mode)
          Returns the links of the CollectionMetadata.
 int getStart()
          Get start value of the CollectionMetadata.
 java.lang.Integer getStart(com.linkedin.data.template.GetMode mode)
          Returns the start value of the CollectionMetadata.
 int getTotal()
          Get the total value of the CollectionMetadata.
 java.lang.Integer getTotal(com.linkedin.data.template.GetMode mode)
          Returns the total value of the CollectionMetadata.
 boolean hasCount()
           
 boolean hasLinks()
           
 boolean hasStart()
           
 boolean hasTotal()
           
 void removeCount()
          Remove count value from CollectionMetadata.
 void removeLinks()
          Remove count value from CollectionMetadata.
 void removeStart()
          Remove start value from CollectionMetadata.
 void removeTotal()
          Remove count value from CollectionMetadata.
 void setCount(int value)
          Set the count value of the CollectionMetadata.
 void setLinks(LinkArray value)
          Set the links value of the CollectionMetadata.
 void setStart(int value)
          Set the start value of the CollectionMetadata.
 void setTotal(int value)
          Set the total value of the CollectionMetadata.
 
Methods inherited from class com.linkedin.data.template.RecordTemplate
clone, contains, copy, data, equals, hashCode, obtainDirect, obtainWrapped, putDirect, putDirect, putDirect, putWrapped, putWrapped, remove, schema, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionMetadata

public CollectionMetadata()
Initialize empty CollectionMetadata.


CollectionMetadata

public CollectionMetadata(com.linkedin.data.DataMap data)
Initialize CollectionMetadata based on the given map.

Parameters:
data - DataMap representing CollectionMetadata
Method Detail

hasStart

public boolean hasStart()
Returns:
true if CollectionMetadata has a start value, false otherwise.

removeStart

public void removeStart()
Remove start value from CollectionMetadata.


getStart

public java.lang.Integer getStart(com.linkedin.data.template.GetMode mode)
Returns the start value of the CollectionMetadata. If the value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the value is not present
Returns:
an Integer

getStart

public int getStart()
Get start value of the CollectionMetadata. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
an int

setStart

public void setStart(int value)
Set the start value of the CollectionMetadata.

Parameters:
value - start value

hasCount

public boolean hasCount()
Returns:
true if CollectionMetadata has a count value, false otherwise.

removeCount

public void removeCount()
Remove count value from CollectionMetadata.


getCount

public java.lang.Integer getCount(com.linkedin.data.template.GetMode mode)
Returns the count value of the CollectionMetadata. If the start value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the value is not present
Returns:
an Integer

getCount

public int getCount()
Get count value of the CollectionMetadata. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
an int

setCount

public void setCount(int value)
Set the count value of the CollectionMetadata.

Parameters:
value - count value

hasTotal

public boolean hasTotal()
Returns:
true if CollectionMetadata has a total value, false otherwise.

removeTotal

public void removeTotal()
Remove count value from CollectionMetadata.


getTotal

public java.lang.Integer getTotal(com.linkedin.data.template.GetMode mode)
Returns the total value of the CollectionMetadata. If the start value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the value is not present
Returns:
an Integer

getTotal

public int getTotal()
Get the total value of the CollectionMetadata. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
an int

setTotal

public void setTotal(int value)
Set the total value of the CollectionMetadata.

Parameters:
value - total value

hasLinks

public boolean hasLinks()
Returns:
true if CollectionMetadata has a links value, false otherwise.

removeLinks

public void removeLinks()
Remove count value from CollectionMetadata.


getLinks

public LinkArray getLinks(com.linkedin.data.template.GetMode mode)
Returns the links of the CollectionMetadata. If the start value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the value is not present
Returns:
a LinkArray

getLinks

public LinkArray getLinks()
Get the links of the CollectionMetadata. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
a LinkArray

setLinks

public void setLinks(LinkArray value)
Set the links value of the CollectionMetadata.

Parameters:
value - links value