

package gov.va.med.cds.hapi.extension;


import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;


public class CustomRequestHl7ModelClassFactory
    extends
        DefaultModelClassFactory
{

    private static final long serialVersionUID = -1694494206299272338L;


    @SuppressWarnings({ "unchecked", "rawtypes" })
    @Override
	public Class getMessageClass( String theName, String theVersion, boolean isExplicit )
        throws HL7Exception
    {
        if ( theName.equals( "SPQ_Q08" ) )
        {
            try
            {
                return Class.forName( "gov.va.med.cds.hapi.extension.message.SPQ_Q08" );
            }
            catch ( ClassNotFoundException e )
            {
                throw new HL7Exception( e );
            }
        }
        return super.getMessageClass( theName, theVersion, isExplicit );
    }
}
