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.CfgDNGroup;
import com.genesyslab.platform.applicationblocks.com.queries.CfgDNGroupQuery;

public class DNGroup {
	
	public DNGroup(){
	}
	
	public CfgDNGroup SelectDNGroup(
			int iTenantDBID, 
			int iDbid,
			final IConfService service)
					throws ConfigException, InterruptedException {
		// Read configuration objects:
		CfgDNGroup rtnDnGroup = null;
		CfgDNGroupQuery dngroupquery = new CfgDNGroupQuery();
		dngroupquery.setTenantDbid(iTenantDBID);
		dngroupquery.setDbid(iDbid);
		Collection<CfgDNGroup> dngroups = service.retrieveMultipleObjects(CfgDNGroup.class,
				dngroupquery);
		for(CfgDNGroup dngroup : dngroups){
			rtnDnGroup = dngroup;
		}

		return rtnDnGroup;
	}
	

}
