/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/lookups/QueueType.java
//#############################################################################
//#                                                                           #
//#  Copyright (C) <2015>  <IMS MAXIMS>                                       #
//#                                                                           #
//#  This program is free software: you can redistribute it and/or modify     #
//#  it under the terms of the GNU Affero General Public License as           #
//#  published by the Free Software Foundation, either version 3 of the       #
//#  License, or (at your option) any later version.                          # 
//#                                                                           #
//#  This program is distributed in the hope that it will be useful,          #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
//#  GNU Affero General Public License for more details.                      #
//#                                                                           #
//#  You should have received a copy of the GNU Affero General Public License #
//#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
//#                                                                           #
//#  IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of    #
//#  this program.  Users of this software do so entirely at their own risk.  #
//#  IMS MAXIMS only ensures the Clinical Safety of unaltered run-time        #
//#  software that it builds, deploys and maintains.                          #
//#                                                                           #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file

package ims.core.vo.lookups;

import ims.framework.cn.data.TreeNode;
import java.util.ArrayList;
import ims.framework.utils.Image;
import ims.framework.utils.Color;

public class QueueType extends ims.vo.LookupInstVo implements TreeNode
{
	private static final long serialVersionUID = 1L;

	public QueueType()
	{
		super();
	}
	public QueueType(int id)
	{
		super(id, "", true);
	}
	public QueueType(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public QueueType(int id, String text, boolean active, QueueType parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public QueueType(int id, String text, boolean active, QueueType parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public QueueType(int id, String text, boolean active, QueueType parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static QueueType buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new QueueType(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (QueueType)super.getParentInstance();
	}
	public QueueType getParent()
	{
		return (QueueType)super.getParentInstance();
	}
	public void setParent(QueueType parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		QueueType[] typedChildren = new QueueType[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (QueueType)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof QueueType)
		{
			super.addChild((QueueType)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof QueueType)
		{
			super.removeChild((QueueType)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		QueueTypeCollection result = new QueueTypeCollection();
		result.add(DEMOGRAPHICFEED);
		result.add(ORDERCHANGERESPONSE);
		result.add(PATIENTDOCUMENT);
		result.add(EDATTENDANCE);
		result.add(INPATIENTADT);
		result.add(DEMOGRAPHICWITHHL7FORWARD);
		result.add(APPOINTMENT);
		result.add(RADIOTHERAPYSCHEDULING);
		result.add(INPATIENTEPISODE);
		result.add(WARDMASTERFILE);
		result.add(GPMASTERFILE);
		result.add(MOSMASTERFILE);
		result.add(GPPRACTICEMASTERFILE);
		result.add(ELECTIVELIST);
		result.add(FINANCIALTRANSACTION);
		result.add(CHARGEDESCRIPTIONMASTERFILE);
		return result;
	}
	public static QueueType[] getNegativeInstances()
	{
		QueueType[] instances = new QueueType[16];
		instances[0] = DEMOGRAPHICFEED;
		instances[1] = ORDERCHANGERESPONSE;
		instances[2] = PATIENTDOCUMENT;
		instances[3] = EDATTENDANCE;
		instances[4] = INPATIENTADT;
		instances[5] = DEMOGRAPHICWITHHL7FORWARD;
		instances[6] = APPOINTMENT;
		instances[7] = RADIOTHERAPYSCHEDULING;
		instances[8] = INPATIENTEPISODE;
		instances[9] = WARDMASTERFILE;
		instances[10] = GPMASTERFILE;
		instances[11] = MOSMASTERFILE;
		instances[12] = GPPRACTICEMASTERFILE;
		instances[13] = ELECTIVELIST;
		instances[14] = FINANCIALTRANSACTION;
		instances[15] = CHARGEDESCRIPTIONMASTERFILE;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[16];
		negativeInstances[0] = "DEMOGRAPHICFEED";
		negativeInstances[1] = "ORDERCHANGERESPONSE";
		negativeInstances[2] = "PATIENTDOCUMENT";
		negativeInstances[3] = "EDATTENDANCE";
		negativeInstances[4] = "INPATIENTADT";
		negativeInstances[5] = "DEMOGRAPHICWITHHL7FORWARD";
		negativeInstances[6] = "APPOINTMENT";
		negativeInstances[7] = "RADIOTHERAPYSCHEDULING";
		negativeInstances[8] = "INPATIENTEPISODE";
		negativeInstances[9] = "WARDMASTERFILE";
		negativeInstances[10] = "GPMASTERFILE";
		negativeInstances[11] = "MOSMASTERFILE";
		negativeInstances[12] = "GPPRACTICEMASTERFILE";
		negativeInstances[13] = "ELECTIVELIST";
		negativeInstances[14] = "FINANCIALTRANSACTION";
		negativeInstances[15] = "CHARGEDESCRIPTIONMASTERFILE";
		return negativeInstances;
	}
	public static QueueType getNegativeInstance(String name)
	{
		if(name == null)
			return null;
		String[] negativeInstances = getNegativeInstanceNames();
		for (int i = 0; i < negativeInstances.length; i++)
		{
			if(negativeInstances[i].equals(name))
				return getNegativeInstances()[i];
		}
		return null;
	}
	public static QueueType getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		QueueType[] negativeInstances = getNegativeInstances();
		for (int i = 0; i < negativeInstances.length; i++)
		{
			if(negativeInstances[i].getID() == id)
				return negativeInstances[i];
		}
		return null;
	}
	public int getTypeId()
	{
		return TYPE_ID;
	}
	public static final int TYPE_ID = 1021259;
	public static final QueueType DEMOGRAPHICFEED = new QueueType(-1851, "DemographicOutboundFeed", true, null, null, Color.Default);
	public static final QueueType ORDERCHANGERESPONSE = new QueueType(-2141, "Order Change Response", true, null, null, Color.Default);
	public static final QueueType PATIENTDOCUMENT = new QueueType(-2150, "Patient Document message queue", true, null, null, Color.Default);
	public static final QueueType EDATTENDANCE = new QueueType(-2544, "ED Attendance", true, null, null, Color.Default);
	public static final QueueType INPATIENTADT = new QueueType(-2545, "Inpatient ADT", true, null, null, Color.Default);
	public static final QueueType DEMOGRAPHICWITHHL7FORWARD = new QueueType(-2695, "DemographicWithHL7Forward", true, null, null, Color.Default);
	public static final QueueType APPOINTMENT = new QueueType(-2696, "Appointment", true, null, null, Color.Default);
	public static final QueueType RADIOTHERAPYSCHEDULING = new QueueType(-2827, "RADIOTHERAPYSCHEDULING", true, null, null, Color.Default);
	public static final QueueType INPATIENTEPISODE = new QueueType(-2909, "InpatientEpisode", true, null, null, Color.Default);
	public static final QueueType WARDMASTERFILE = new QueueType(-2946, "WardMasterFile", true, null, null, Color.Default);
	public static final QueueType GPMASTERFILE = new QueueType(-2947, "GP Master File", true, null, null, Color.Default);
	public static final QueueType MOSMASTERFILE = new QueueType(-2948, "MOS Master File", true, null, null, Color.Default);
	public static final QueueType GPPRACTICEMASTERFILE = new QueueType(-2949, "GP Practice Master File", true, null, null, Color.Default);
	public static final QueueType ELECTIVELIST = new QueueType(-2960, "ELECTIVELIST", true, null, null, Color.Default);
	public static final QueueType FINANCIALTRANSACTION = new QueueType(-3406, "FINANCIALTRANSACTION", true, null, null, Color.Default);
	public static final QueueType CHARGEDESCRIPTIONMASTERFILE = new QueueType(-3414, "CHARGEDESCRIPTIONMASTERFILE", true, null, null, Color.Default);
}
