package kr.co.i4way.genesys.config;

import java.util.Collection;

import com.genesyslab.platform.applicationblocks.com.ConfigException;
import com.genesyslab.platform.applicationblocks.com.IConfService;
import com.genesyslab.platform.applicationblocks.com.objects.CfgDN;
import com.genesyslab.platform.applicationblocks.com.queries.CfgDNQuery;

public class DNs {

	public DNs(){
	}
	
	public CfgDN SelectDN(
			int iTenantDBID, 
			int iDbid,
			final IConfService service)
					throws ConfigException, InterruptedException {
		// Read configuration objects:
		CfgDN rtnDn = null;
		CfgDNQuery dnquery = new CfgDNQuery();
		dnquery.setTenantDbid(iTenantDBID);
		dnquery.setDbid(iDbid);
		Collection<CfgDN> dns = service.retrieveMultipleObjects(CfgDN.class,
				dnquery);
		for(CfgDN dn : dns){
			rtnDn = dn;
		}

		return rtnDn;
	}
	

}
