/*******************************************************************************
 *  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 NEventReportImagePrintMangMeta_Attributes 
{
	private NEventReportPrinterAttribute objNEventReportPrinterAttribute;
	private NEventReportPrintJobAttribute objNEventReportPrintJobAttribute;
	private EnumSOPClassUIDs enumSOPClassUIDs;
	/**
	 * This is default Constructor for NEventReportImagePrintMangMeta_Attributes.
	 */
	public NEventReportImagePrintMangMeta_Attributes() {
		super();
	}
	
	
	
	public NEventReportImagePrintMangMeta_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(objNEventReportPrinterAttribute == null)
				objNEventReportPrinterAttribute = new NEventReportPrinterAttribute();
			objNEventReportPrinterAttribute.populate(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTJOBIOD))
		{	
			if(objNEventReportPrintJobAttribute == null)
				objNEventReportPrintJobAttribute = new NEventReportPrintJobAttribute();
			objNEventReportPrintJobAttribute.populate(objIDataSet);
		}
	}	
	
	/**
	 * Fills the dataset using already populated Query Model.
	 */
	public void fill(IDataSet objIDataSet)
	{
		if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTERIOD))
		{
			if(objNEventReportPrinterAttribute != null)
				objNEventReportPrinterAttribute.fill(objIDataSet);
		}
		else if(this.enumSOPClassUIDs.equals(EnumSOPClassUIDs.PRINTJOBIOD))
		{
			if(objNEventReportPrintJobAttribute != null)
				objNEventReportPrintJobAttribute.fill(objIDataSet);
		}
	}

	/**
	 * Retrieve the object of NEventReportPrinterAttribute.
	 * @return Object of NEventReportPrinterAttribute
	 */
	public NEventReportPrinterAttribute getNEventReportPrinterAttribute() 
	{
		if(objNEventReportPrinterAttribute == null)
			objNEventReportPrinterAttribute = new NEventReportPrinterAttribute();
		return objNEventReportPrinterAttribute;
	}

	/**
	 * Set the value of NEventReportPrinterAttribute.
	 * @param objNEventReportPrinterAttribute
	 */
	public void setNEventReportPrinterAttribute(NEventReportPrinterAttribute objNEventReportPrinterAttribute)
	{
		this.objNEventReportPrinterAttribute = objNEventReportPrinterAttribute;
	}

	/**
	 * Retrieve the object of NEventReportPrintJobAttribute.
	 * @return Object of NEventReportPrintJobAttribute
	 */
	public NEventReportPrintJobAttribute getNEventReportPrintJobAttribute()
	{
		if(objNEventReportPrintJobAttribute == null)
			objNEventReportPrintJobAttribute = new NEventReportPrintJobAttribute();
		return objNEventReportPrintJobAttribute;
	}
	/**
	 * Set the value of NEventReportPrintJobAttribute.
	 * @param objNEventReportPrintJobAttribute
	 */
	public void setNEventReportPrintJobAttribute(NEventReportPrintJobAttribute objNEventReportPrintJobAttribute) 
	{
		this.objNEventReportPrintJobAttribute = objNEventReportPrintJobAttribute;
	}
}
