package com.agilex.healthcare.schedulingmanager.mdws;


import com.agilex.healthcare.schedulingmanager.mdws.connection.MdwsConfiguration;
import com.agilex.healthcare.schedulingmanager.mdws.connection.QueryConnection;
import com.agilex.healthcare.schedulingmanager.mdws.connection.QueryConnectionManager;
import com.agilex.healthcare.schedulingmanager.mdws.connection.QueryConnectionManagerFactory;

public class MdwsQueryDataLayer {

    protected MdwsConfiguration mdwsConfiguration;

    public MdwsQueryDataLayer(MdwsConfiguration mdwsConfiguration) {
        this.mdwsConfiguration = mdwsConfiguration;
    }

    protected QueryConnection getAuthenticatedConnection(String siteCode) {
        QueryConnectionManager connectionManager = QueryConnectionManagerFactory.getInstance();
        return connectionManager.getAuthenticatedSiteConnection(mdwsConfiguration, siteCode);
    }
}
