au.gov.nehta.vendorlibrary.pcehr.clients.common.type
Class TypedViewResponse<T>

java.lang.Object
  extended by au.gov.nehta.vendorlibrary.pcehr.clients.common.type.TypedViewResponse<T>
Type Parameters:
T - The type held in the "data" tag of the view

public class TypedViewResponse<T>
extends java.lang.Object

This immutable class holds an unmarshalled response object and the original response view object


Constructor Summary
TypedViewResponse(au.net.electronichealth.ns.pcehr.xsd.interfaces.getview._1.GetViewResponse getViewResponse, T responseObject)
           
 
Method Summary
 java.lang.String getCode()
          A convenience accessor to getViewResponse.getResponseStatus().getCode()
 au.net.electronichealth.ns.pcehr.xsd.interfaces.getview._1.GetViewResponse getGetViewResponse()
          Get the original GetViewResponse object
 T getResponseObject()
          Get the typed response object held the the "data" tag
static
<T> TypedViewResponse<T>
unmarshall(java.lang.Class<T> clazz, au.net.electronichealth.ns.pcehr.xsd.interfaces.getview._1.GetViewResponse getViewResponse)
          Create a typed view response
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedViewResponse

public TypedViewResponse(au.net.electronichealth.ns.pcehr.xsd.interfaces.getview._1.GetViewResponse getViewResponse,
                         T responseObject)
Method Detail

unmarshall

public static <T> TypedViewResponse<T> unmarshall(java.lang.Class<T> clazz,
                                                  au.net.electronichealth.ns.pcehr.xsd.interfaces.getview._1.GetViewResponse getViewResponse)
Create a typed view response

Parameters:
clazz - the Type to unmarshall held in the response object
getViewResponse - the full view response;
Returns:
a typed holder object,TypedViewResponse

getResponseObject

public T getResponseObject()
Get the typed response object held the the "data" tag


getGetViewResponse

public au.net.electronichealth.ns.pcehr.xsd.interfaces.getview._1.GetViewResponse getGetViewResponse()
Get the original GetViewResponse object


getCode

public java.lang.String getCode()
A convenience accessor to getViewResponse.getResponseStatus().getCode()