/*******************************************************************************
 *  Copyright 2017-2018 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.dcm30_04.services.print.printsourceimpl;

import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSOPClassUIDs;

/**
 *  This class contains the Attributes for Query Model. Also contains methods to populate and fill dataset of Query Model.
 */
public class NGetImagePrintMangMeta_Attributes 
{
	private NGetPrinterAttribute objNGetPrinterAttribute;
	private NGetPrinterConfigurationRetrievalAttribute objNGetPrinterConfigurationRetrievalAttribute;
	private NGetPrintJobAttribute objNGetPrintJobAttribute;
	private NGetPrintQueueMangAttribute objNGetPrintQueueMangAttribute;
	private EnumSOPClassUIDs enumSOPClassUIDs;
	
	/**
	 * This is default Constructor for NGetImagePrintMangMeta_Attributes.
	 */
	public NGetImagePrintMangMeta_Attributes() {
		super();
	}
	
	
	public NGetImagePrintMangMeta_Attributes(EnumSOPClassUIDs enumSOPClassUIDs)
	{
		this.enumSOPClassUIDs = enumSOPClassUIDs;
	}
	
	/**
	 * Populates the query Model using filled dataset.
	 */
	public void populate(IDataSet objIDataSet)
	{
		if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTERIOD))
		{
			if(objNGetPrinterAttribute == null)
				objNGetPrinterAttribute = new NGetPrinterAttribute();
			objNGetPrinterAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTERCONFIGURATIONRETRIEVAL))
		{
			if(objNGetPrinterConfigurationRetrievalAttribute == null)
				objNGetPrinterConfigurationRetrievalAttribute = new NGetPrinterConfigurationRetrievalAttribute();
			objNGetPrinterConfigurationRetrievalAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTJOBIOD))
		{
			if(objNGetPrintJobAttribute == null)
				objNGetPrintJobAttribute = new NGetPrintJobAttribute();
			objNGetPrintJobAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTQUEUEMANAGEMENTIOD))
		{
			if(objNGetPrintQueueMangAttribute == null)
				objNGetPrintQueueMangAttribute = new NGetPrintQueueMangAttribute();
			objNGetPrintQueueMangAttribute.populate(objIDataSet);
		}
	}	
	
	/**
	 * Fills the dataset using already populated Query Model.
	 */
	public void fill(IDataSet objIDataSet)
	{
		if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTERIOD))
		{
			if(objNGetPrinterAttribute != null)
				objNGetPrinterAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTERCONFIGURATIONRETRIEVAL))
		{
			if(objNGetPrinterConfigurationRetrievalAttribute != null)
				objNGetPrinterConfigurationRetrievalAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTJOBIOD))
		{
			if(objNGetPrintJobAttribute != null)
				objNGetPrintJobAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTQUEUEMANAGEMENTIOD))
		{
			if(objNGetPrintQueueMangAttribute != null)
				objNGetPrintQueueMangAttribute.fill(objIDataSet);
		}
	}

	/**
	 * Retrieve the object of NGetPrinterAttribute.
	 * @return Object of NGetPrinterAttribute
	 */
	public NGetPrinterAttribute getNCreateSOPCommonAttributes()
	{
		if(objNGetPrinterAttribute == null)
			objNGetPrinterAttribute = new NGetPrinterAttribute();
		return objNGetPrinterAttribute;
	}
	/**
	 * Set the value of NCreateSOPCommonAttributes.
	 * @param objNGetPrinterAttribute - object of NCreateSOPCommonAttributes
	 */
	public void setNCreateSOPCommonAttributes(NGetPrinterAttribute objNGetPrinterAttribute)
	{
		this.objNGetPrinterAttribute = objNGetPrinterAttribute;
	}

	/**
	 * Retrieve the object of NGetPrinterConfigurationRetrievalAttribute.
	 * @return Object of NGetPrinterConfigurationRetrievalAttribute
	 */
	public NGetPrinterConfigurationRetrievalAttribute getNGetPrinterConfigurationRetrievalAttribute() 
	{
		if(objNGetPrinterConfigurationRetrievalAttribute == null)
			objNGetPrinterConfigurationRetrievalAttribute = new NGetPrinterConfigurationRetrievalAttribute();
		return objNGetPrinterConfigurationRetrievalAttribute;
	}
	/**
	 * Set the value of objNGetPrinterConfigurationRetrievalAttribute.
	 * @param objNGetPrinterConfigurationRetrievalAttribute - object of NGetPrinterConfigurationRetrievalAttribute
	 */
	public void setNGetPrinterConfigurationRetrievalAttribute(NGetPrinterConfigurationRetrievalAttribute objNGetPrinterConfigurationRetrievalAttribute)
	{
		this.objNGetPrinterConfigurationRetrievalAttribute = objNGetPrinterConfigurationRetrievalAttribute;
	}

	/**
	 * Retrieve the object of NGetPrintJobAttribute.
	 * @return Object of NGetPrintJobAttribute
	 */
	public NGetPrintJobAttribute getNGetPrintJobAttribute()
	{
		if(objNGetPrintJobAttribute == null)
			objNGetPrintJobAttribute = new NGetPrintJobAttribute();
		return objNGetPrintJobAttribute;
	}
	/**
	 * Set the value of PrintJobAttribute.
	 * @param objPrintJobAttribute - object of PrintJobAttribute
	 */
	public void setNGetPrintJobAttribute(NGetPrintJobAttribute objNGetPrintJobAttribute) 
	{
		this.objNGetPrintJobAttribute = objNGetPrintJobAttribute;
	}

	/**
	 * Retrieve the object of NGetPrintQueueMangAttribute.
	 * @return Object of NGetPrintQueueMangAttribute
	 */
	public NGetPrintQueueMangAttribute getNGetPrintQueueMangAttribute()
	{
		if(objNGetPrintQueueMangAttribute == null)
			objNGetPrintQueueMangAttribute = new NGetPrintQueueMangAttribute();
		return objNGetPrintQueueMangAttribute;
	}
	/**
	 * Set the value of setNGetPrintQueueMangAttribute.
	 * @param objsetNGetPrintQueueMangAttribute - object of ISingleCollection
	 */
	public void setNGetPrintQueueMangAttribute(NGetPrintQueueMangAttribute objNGetPrintQueueMangAttribute) 
	{
		this.objNGetPrintQueueMangAttribute = objNGetPrintQueueMangAttribute;
	}
	/**
	 * Retrieve the object of NGetPrinterAttribute.
	 * @return Object of NGetPrinterAttribute
	 */
	public NGetPrinterAttribute getNGetPrinterAttribute() {
		return objNGetPrinterAttribute;
	}
	/**
	 * Set the value of NGetPrinterAttribute.
	 * @param objNGetPrinterAttributet - object of NGetPrinterAttribute
	 */
	public void setNGetPrinterAttribute(
			NGetPrinterAttribute objNGetPrinterAttribute) {
		this.objNGetPrinterAttribute = objNGetPrinterAttribute;
	}
}
