

package gov.va.med.cds.integration;


import gov.va.med.cds.filter.EntryFilterInterface;
import gov.va.med.cds.persistence.hibernate.VistaStoredProcedureQueryWork;
import gov.va.med.cds.response.strategy.VistaStoredProcedureResponseStrategyInterface;
import gov.va.med.cds.template.generated.JaxBMarshallerUnmarshallerInterface;
import gov.va.med.cds.persistence.PooledConnectionUnwrapperInterface;
import gov.va.med.cds.persistence.QueryAssociationInterface;
import gov.va.med.cds.persistence.QueryWorkInterface;
import gov.va.med.cds.persistence.VistaStoredProcedureBasedQueryStrategy;

import java.util.List;
import java.util.Map;

import org.hibernate.Session;


public class VistaStoredProcedureQueryTimeoutBasedQueryStrategy
    extends
    VistaStoredProcedureBasedQueryStrategy
{
	 /*
	protected VistaStoredProcedureResponseStrategyInterface vistaResponseStrategy;
    protected Map<String, String> queryMap;
    protected Map<String, String> templateTimeoutMap;
    protected PooledConnectionUnwrapperInterface pooledConnectionUnwrapper;*/


    protected QueryWorkInterface createQueryWork( Session session, QueryAssociationInterface queryAssociation, EntryFilterInterface entryFilter, List<String> personIdentifiers,
                    Class<?> pointInTimeUserType, String siteId, JaxBMarshallerUnmarshallerInterface marshallerUnmarshaller )
    {

        VistaStoredProcedureQueryTimeoutQueryWork queryWork = new VistaStoredProcedureQueryTimeoutQueryWork( session, queryAssociation, entryFilter, personIdentifiers, parameterTransformerMap, queryMap,
                        vistaResponseStrategy, applicationName, siteId );
        queryWork.setTemplateTimeoutMap( templateTimeoutMap );
        queryWork.setVistaResponseStrategy( vistaResponseStrategy );
        queryWork.setQueryMap( queryMap );
        queryWork.setPooledConnectionUnwrapper( pooledConnectionUnwrapper );
        return queryWork;
    }


    public void setVistaResponseStrategy( VistaStoredProcedureResponseStrategyInterface vistaResponseStrategy )
    {
        this.vistaResponseStrategy = vistaResponseStrategy;
    }


    public void setQueryMap( Map<String, String> queryMap )
    {
        this.queryMap = queryMap;
    }


    public void setTemplateTimeoutMap( Map<String, String> templateTimeoutMap )
    {
        this.templateTimeoutMap = templateTimeoutMap;
    }


    public void setPooledConnectionUnwrapper( PooledConnectionUnwrapperInterface pooledConnectionUnwrapper )
    {
        this.pooledConnectionUnwrapper = pooledConnectionUnwrapper;
    }
}
