com.linkedin.restli.common
Class ActionResponse<T>

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

public final class ActionResponse<T>
extends com.linkedin.data.template.DynamicRecordTemplate

A response from an action. Has a single value field, of template or primitive type.


Field Summary
static java.lang.String VALUE_NAME
           
 
Constructor Summary
ActionResponse(java.lang.Class<T> valueClass)
          Deprecated. RecordDataSchema should be computed in builders and passed, rather than creating it on the fly.
ActionResponse(com.linkedin.data.DataMap data, java.lang.Class<T> valueClass)
          Deprecated. value FieldDef and associated RecordDataSchema should be computed in builders and passed in here rather than being computed on the fly.
ActionResponse(com.linkedin.data.DataMap data, com.linkedin.data.template.FieldDef<T> valueFieldDef, com.linkedin.data.schema.RecordDataSchema schema)
          Initialize an ActionResponse based on the data returned from the RestLi server, the expected return type of the Action, and the RecordDataSchema for the Action return.
ActionResponse(com.linkedin.data.template.FieldDef<T> valueFieldDef, com.linkedin.data.schema.RecordDataSchema schema)
          Initialize an ActionResponse based on the expected return type of the action
ActionResponse(T value)
          Deprecated. 
ActionResponse(T value, com.linkedin.data.template.FieldDef<T> valueFieldDef, com.linkedin.data.schema.RecordDataSchema schema)
          Initialize an ActionResponse based on the value result of the Action.
 
Method Summary
 T getValue()
          Get the value result of the Action.
 void setValue(T value)
          Set the value result of the Action.
 
Methods inherited from class com.linkedin.data.template.DynamicRecordTemplate
getValue, setValue
 
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
 

Field Detail

VALUE_NAME

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

ActionResponse

public ActionResponse(com.linkedin.data.DataMap data,
                      com.linkedin.data.template.FieldDef<T> valueFieldDef,
                      com.linkedin.data.schema.RecordDataSchema schema)
Initialize an ActionResponse based on the data returned from the RestLi server, the expected return type of the Action, and the RecordDataSchema for the Action return.

Parameters:
data - DataMap of the returned data
valueFieldDef - the FieldDef representing the action return.
schema - the RecordDataSchema of the Action return

ActionResponse

@Deprecated
public ActionResponse(com.linkedin.data.DataMap data,
                                 java.lang.Class<T> valueClass)
Deprecated. value FieldDef and associated RecordDataSchema should be computed in builders and passed in here rather than being computed on the fly.

Initialize an ActionResponse based on the data returned from the RestLi server, the expected return type of the Action, and the RecordDataSchema for the Action return.

Parameters:
data - DataMap of the returned data
valueClass - expected return type of the Action

ActionResponse

public ActionResponse(com.linkedin.data.template.FieldDef<T> valueFieldDef,
                      com.linkedin.data.schema.RecordDataSchema schema)
Initialize an ActionResponse based on the expected return type of the action

Parameters:
valueFieldDef - the FieldDef representing the action return.
schema - the RecordDataSchema of the Action return

ActionResponse

@Deprecated
public ActionResponse(java.lang.Class<T> valueClass)
Deprecated. RecordDataSchema should be computed in builders and passed, rather than creating it on the fly.

Initialize an ActionResponse based on the expected return type of the action

Parameters:
valueClass - Class of the type that the Action is expected to return

ActionResponse

public ActionResponse(T value,
                      com.linkedin.data.template.FieldDef<T> valueFieldDef,
                      com.linkedin.data.schema.RecordDataSchema schema)
Initialize an ActionResponse based on the value result of the Action.

Parameters:
value - Class of the type that the Action is expected to return
valueFieldDef - the FieldDef representing the action return.
schema - the RecordDataSchema of the Action return

ActionResponse

@Deprecated
public ActionResponse(T value)
Deprecated. 

Initialize an ActionResponse based on the value result of the Action.

Parameters:
value - Class of the type that the Action is expected to return
Method Detail

getValue

public T getValue()
Get the value result of the Action.

Returns:
value of type T

setValue

public void setValue(T value)
Set the value result of the Action.

Parameters:
value - value of type T