/*******************************************************************************
 *  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.substanceadministration.sourceimpl;

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

/**
 *  This class contains the Attributes for Query Model. Also contains methods to populate and fill data set of Query Model.
 */
public class SubstanceAdministration_Attributes 
{
	private VisitIdentificationAttributes objVisitIdentificationAttributes;
	private PatientIdentificationAttributes objPatientIdentificationAttributes;
	private PatientDemographicAttributes objPatientDemographicAttributes;
	private ProductAttributes objProductAttributes;
	private SubstanceAdministrationAttributes objSubstanceAdministrationAttributes;
	private SubstanceApprovalAttributes objSubstanceApprovalAttributes;
	
	/**
	 * Populates the query Model using filled data set.
	 */
	public void populate(IDataSet objIDataSet)
	{
		
		if(objVisitIdentificationAttributes == null)
			objVisitIdentificationAttributes = new VisitIdentificationAttributes();
		objVisitIdentificationAttributes.populate(objIDataSet);
		
		if(objPatientIdentificationAttributes == null)
			objPatientIdentificationAttributes = new PatientIdentificationAttributes();
		objPatientIdentificationAttributes.populate(objIDataSet);
		
		if(objPatientDemographicAttributes == null)
			objPatientDemographicAttributes = new PatientDemographicAttributes();
		objPatientDemographicAttributes.populate(objIDataSet);	
		
		if(objProductAttributes == null)
			objProductAttributes = new ProductAttributes();
		objProductAttributes.populate(objIDataSet);
		
		if(objSubstanceAdministrationAttributes == null)
			objSubstanceAdministrationAttributes = new SubstanceAdministrationAttributes();
		objSubstanceAdministrationAttributes.populate(objIDataSet);
		
		if(objSubstanceApprovalAttributes == null)
			objSubstanceApprovalAttributes = new SubstanceApprovalAttributes();
		objSubstanceApprovalAttributes.populate(objIDataSet);
	}	
	
	/**
	 * Fills the data set using already populated Query Model.
	 */
	public void fill(IDataSet objIDataSet)
	{
		if(objVisitIdentificationAttributes != null)
			objVisitIdentificationAttributes.fill(objIDataSet);
		
		if(objPatientIdentificationAttributes != null)
			objPatientIdentificationAttributes.fill(objIDataSet);
		
		if(objPatientDemographicAttributes != null)
			objPatientDemographicAttributes.fill(objIDataSet);
		
		if(objProductAttributes != null)
			objProductAttributes.fill(objIDataSet);
		
		if(objSubstanceAdministrationAttributes != null)
			objSubstanceAdministrationAttributes.fill(objIDataSet);
		
		if(objSubstanceApprovalAttributes != null)
			objSubstanceApprovalAttributes.fill(objIDataSet);
	}


	/**
	 * Retrieve the object of VisitIdentificationAttributes.
	 * @return Object of VisitIdentificationAttributes
	 */
	public VisitIdentificationAttributes getVisitIdentificationAttributes()
	{
		if(objVisitIdentificationAttributes == null)
			objVisitIdentificationAttributes = new VisitIdentificationAttributes();
		return objVisitIdentificationAttributes;
	}
	/**
	 * Sets the object of VisitIdentificationAttributes.
	 * @param objVisitIdentificationAttributes
	 */
	public void setVisitIdentificationAttributes(VisitIdentificationAttributes objVisitIdentificationAttributes)
	{
		this.objVisitIdentificationAttributes = objVisitIdentificationAttributes;
	}
	
	/**
	 * Retrieve the object of PatientIdentificationAttributes.
	 * @return Object of PatientIdentificationAttributes
	 */
	public PatientIdentificationAttributes getPatientIdentificationAttributes()
	{
		if(objPatientIdentificationAttributes == null)
			objPatientIdentificationAttributes = new PatientIdentificationAttributes();
		return objPatientIdentificationAttributes;
	}
	/**
	 * Sets the object of PatientIdentificationAttributes.
	 * @param objPatientIdentificationAttributes
	 */
	public void setPatientIdentificationAttributes(PatientIdentificationAttributes objPatientIdentificationAttributes)
	{
		this.objPatientIdentificationAttributes = objPatientIdentificationAttributes;
	}

	/**
	 * Retrieve the object of ProductAttributes.
	 * @return Object of ProductAttributes
	 */
	public ProductAttributes getProductAttributes()
	{
		if(objProductAttributes== null)
			objProductAttributes = new ProductAttributes();
		return objProductAttributes;
	}
	/**
	 * Sets the object of ProductAttributes.
	 * @param objProductAttributes
	 */
	public void setProductAttributes(ProductAttributes objProductAttributes)
	{
		this.objProductAttributes = objProductAttributes;
	}
	
	/**
	 * Retrieve the object of SubstanceAdministrationAttributes.
	 * @return Object of SubstanceAdministrationAttributes
	 */
	public SubstanceAdministrationAttributes getSubstanceAdministrationAttributes()
	{
		if(objSubstanceAdministrationAttributes == null)
			objSubstanceAdministrationAttributes = new SubstanceAdministrationAttributes();
		return objSubstanceAdministrationAttributes;
	}
	/**
	 * Sets the object of SubstanceAdministrationAttributes.
	 * @param objSubstanceAdministrationAttributes
	 */
	public void setSubstanceAdministrationAttributes(SubstanceAdministrationAttributes objSubstanceAdministrationAttributes)
	{
		this.objSubstanceAdministrationAttributes = objSubstanceAdministrationAttributes;
	}
	
	/**
	 * Retrieve the object of SubstanceApprovalAttributes.
	 * @return Object of SubstanceApprovalAttributes
	 */
	public SubstanceApprovalAttributes getSubstanceApprovalAttributes()
	{
		if(objSubstanceApprovalAttributes == null)
			objSubstanceApprovalAttributes = new SubstanceApprovalAttributes();
		return objSubstanceApprovalAttributes;
	}
	/**
	 * Sets the object of SubstanceApprovalAttributes.
	 * @param objSubstanceApprovalAttributes
	 */
	public void setSubstanceApprovalAttributes(SubstanceApprovalAttributes objSubstanceApprovalAttributes)
	{
		this.objSubstanceApprovalAttributes = objSubstanceApprovalAttributes;
	}
	
	/**
	 * Retrieve the object of PatientDemographicAttributes.
	 * @return Object of PatientDemographicAttributes
	 */
	public PatientDemographicAttributes getPatientDemographicAttributes()
	{
		if(objPatientDemographicAttributes == null)
			objPatientDemographicAttributes = new PatientDemographicAttributes();
		return objPatientDemographicAttributes;
	}
	/**
	 * Sets the object of PatientDemographicAttributes.
	 * @param objPatientDemographicAttributes
	 */
	public void setPatientDemographicAttributes(PatientDemographicAttributes objPatientDemographicAttributes)
	{
		this.objPatientDemographicAttributes = objPatientDemographicAttributes;
	}

}
