package com.agilex.healthcare.schedulingmanager.mdws;

public class MdwsResponseValidator {
	private static final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(MdwsResponseValidator.class);

    public static <T extends com.agilex.healthcare.schedulingmanager.mdws.generatedwsdl.schedulingservice.AbstractTO> void validateMdwsObject(T t){
        if(t.getFault() != null){
            logger.error("MDWSLib MdwsResponseValidator Exception : " + t.getFault().getMessage());
            throw new MdwsResponseException(t.getFault());
        }
    }

    public static <T extends com.agilex.healthcare.schedulingmanager.mdws.generatedwsdl.schedulingservice.AbstractTaggedArrayTO> void validateMdwsObject(T t){
        if(t.getFault() != null){
            logger.error("MDWSLib MdwsResponseValidator Exception : " + t.getFault().getMessage());
            throw new MdwsResponseException(t.getFault());
        }
    }

    public static <T extends com.agilex.healthcare.schedulingmanager.mdws.generatedwsdl.emrservice.AbstractTO> void validateMdwsObject(T t){
        if(t.getFault() != null){
            logger.error("MDWSLib MdwsResponseValidator Exception : " + t.getFault().getMessage());
            throw new MdwsResponseException(t.getFault());
        }
    }

    public static <T extends com.agilex.healthcare.schedulingmanager.mdws.generatedwsdl.queryservice.AbstractTO> void validateMdwsObject(T t){
        if(t.getFault() != null){
            logger.error("MDWSLib MdwsResponseValidator Exception : " + t.getFault().getMessage());
            throw new MdwsResponseException(t.getFault());
        }
    }
}
