/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/lookups/MsgEventType.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 MsgEventType extends ims.vo.LookupInstVo implements TreeNode
{
	private static final long serialVersionUID = 1L;

	public MsgEventType()
	{
		super();
	}
	public MsgEventType(int id)
	{
		super(id, "", true);
	}
	public MsgEventType(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public MsgEventType(int id, String text, boolean active, MsgEventType parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public MsgEventType(int id, String text, boolean active, MsgEventType parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public MsgEventType(int id, String text, boolean active, MsgEventType parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static MsgEventType buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new MsgEventType(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (MsgEventType)super.getParentInstance();
	}
	public MsgEventType getParent()
	{
		return (MsgEventType)super.getParentInstance();
	}
	public void setParent(MsgEventType parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		MsgEventType[] typedChildren = new MsgEventType[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (MsgEventType)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof MsgEventType)
		{
			super.addChild((MsgEventType)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof MsgEventType)
		{
			super.removeChild((MsgEventType)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		MsgEventTypeCollection result = new MsgEventTypeCollection();
		result.add(A01);
		result.add(A02);
		result.add(A03);
		result.add(A05);
		result.add(A08);
		result.add(A10);
		result.add(A11);
		result.add(A12);
		result.add(A13);
		result.add(A15);
		result.add(A16);
		result.add(A21);
		result.add(A22);
		result.add(A25);
		result.add(A26);
		result.add(A28);
		result.add(A29);
		result.add(A31);
		result.add(A38);
		result.add(A40);
		result.add(A47);
		result.add(A52);
		result.add(A53);
		result.add(A60);
		result.add(I12);
		result.add(I13);
		result.add(I14);
		result.add(M02);
		result.add(M04);
		result.add(M05);
		result.add(O02);
		result.add(O20);
		result.add(S12);
		result.add(S13);
		result.add(S14);
		result.add(S14UNARRIVE);
		result.add(S15);
		result.add(S26);
		result.add(T02);
		result.add(UNKNOWN);
		result.add(P01);
		result.add(P02);
		result.add(P03);
		result.add(P05);
		return result;
	}
	public static MsgEventType[] getNegativeInstances()
	{
		MsgEventType[] instances = new MsgEventType[44];
		instances[0] = A01;
		instances[1] = A02;
		instances[2] = A03;
		instances[3] = A05;
		instances[4] = A08;
		instances[5] = A10;
		instances[6] = A11;
		instances[7] = A12;
		instances[8] = A13;
		instances[9] = A15;
		instances[10] = A16;
		instances[11] = A21;
		instances[12] = A22;
		instances[13] = A25;
		instances[14] = A26;
		instances[15] = A28;
		instances[16] = A29;
		instances[17] = A31;
		instances[18] = A38;
		instances[19] = A40;
		instances[20] = A47;
		instances[21] = A52;
		instances[22] = A53;
		instances[23] = A60;
		instances[24] = I12;
		instances[25] = I13;
		instances[26] = I14;
		instances[27] = M02;
		instances[28] = M04;
		instances[29] = M05;
		instances[30] = O02;
		instances[31] = O20;
		instances[32] = S12;
		instances[33] = S13;
		instances[34] = S14;
		instances[35] = S14UNARRIVE;
		instances[36] = S15;
		instances[37] = S26;
		instances[38] = T02;
		instances[39] = UNKNOWN;
		instances[40] = P01;
		instances[41] = P02;
		instances[42] = P03;
		instances[43] = P05;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[44];
		negativeInstances[0] = "A01";
		negativeInstances[1] = "A02";
		negativeInstances[2] = "A03";
		negativeInstances[3] = "A05";
		negativeInstances[4] = "A08";
		negativeInstances[5] = "A10";
		negativeInstances[6] = "A11";
		negativeInstances[7] = "A12";
		negativeInstances[8] = "A13";
		negativeInstances[9] = "A15";
		negativeInstances[10] = "A16";
		negativeInstances[11] = "A21";
		negativeInstances[12] = "A22";
		negativeInstances[13] = "A25";
		negativeInstances[14] = "A26";
		negativeInstances[15] = "A28";
		negativeInstances[16] = "A29";
		negativeInstances[17] = "A31";
		negativeInstances[18] = "A38";
		negativeInstances[19] = "A40";
		negativeInstances[20] = "A47";
		negativeInstances[21] = "A52";
		negativeInstances[22] = "A53";
		negativeInstances[23] = "A60";
		negativeInstances[24] = "I12";
		negativeInstances[25] = "I13";
		negativeInstances[26] = "I14";
		negativeInstances[27] = "M02";
		negativeInstances[28] = "M04";
		negativeInstances[29] = "M05";
		negativeInstances[30] = "O02";
		negativeInstances[31] = "O20";
		negativeInstances[32] = "S12";
		negativeInstances[33] = "S13";
		negativeInstances[34] = "S14";
		negativeInstances[35] = "S14UNARRIVE";
		negativeInstances[36] = "S15";
		negativeInstances[37] = "S26";
		negativeInstances[38] = "T02";
		negativeInstances[39] = "UNKNOWN";
		negativeInstances[40] = "P01";
		negativeInstances[41] = "P02";
		negativeInstances[42] = "P03";
		negativeInstances[43] = "P05";
		return negativeInstances;
	}
	public static MsgEventType 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 MsgEventType getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		MsgEventType[] 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 = 1021260;
	public static final MsgEventType A01 = new MsgEventType(-2546, "A01", true, null, null, Color.Default);
	public static final MsgEventType A02 = new MsgEventType(-2912, "A02", true, null, null, Color.Default);
	public static final MsgEventType A03 = new MsgEventType(-2548, "A03", true, null, null, Color.Default);
	public static final MsgEventType A05 = new MsgEventType(-2958, "A05", true, null, null, Color.Default);
	public static final MsgEventType A08 = new MsgEventType(-2547, "A08", true, null, null, Color.Default);
	public static final MsgEventType A10 = new MsgEventType(-3034, "A10", true, null, null, Color.Default);
	public static final MsgEventType A11 = new MsgEventType(-2549, "A11", true, null, null, Color.Default);
	public static final MsgEventType A12 = new MsgEventType(-2913, "A12", true, null, null, Color.Default);
	public static final MsgEventType A13 = new MsgEventType(-2550, "A13", true, null, null, Color.Default);
	public static final MsgEventType A15 = new MsgEventType(-3011, "A15", true, null, null, Color.Default);
	public static final MsgEventType A16 = new MsgEventType(-3122, "A16", true, null, null, Color.Default);
	public static final MsgEventType A21 = new MsgEventType(-2914, "A21", true, null, null, Color.Default);
	public static final MsgEventType A22 = new MsgEventType(-2915, "A22", true, null, null, Color.Default);
	public static final MsgEventType A25 = new MsgEventType(-3123, "A25", true, null, null, Color.Default);
	public static final MsgEventType A26 = new MsgEventType(-3012, "A26", true, null, null, Color.Default);
	public static final MsgEventType A28 = new MsgEventType(-1852, "A28", true, null, null, Color.Default);
	public static final MsgEventType A29 = new MsgEventType(-3237, "A29", true, null, null, Color.Default);
	public static final MsgEventType A31 = new MsgEventType(-1853, "A31", true, null, null, Color.Default);
	public static final MsgEventType A38 = new MsgEventType(-2959, "A38", true, null, null, Color.Default);
	public static final MsgEventType A40 = new MsgEventType(-1854, "A40", true, null, null, Color.Default);
	public static final MsgEventType A47 = new MsgEventType(-2551, "A47", true, null, null, Color.Default);
	public static final MsgEventType A52 = new MsgEventType(-2916, "A52", true, null, null, Color.Default);
	public static final MsgEventType A53 = new MsgEventType(-2917, "A53", true, null, null, Color.Default);
	public static final MsgEventType A60 = new MsgEventType(-3026, "A60", true, null, null, Color.Default);
	public static final MsgEventType I12 = new MsgEventType(-3027, "I12", true, null, null, Color.Default);
	public static final MsgEventType I13 = new MsgEventType(-3028, "I13", true, null, null, Color.Default);
	public static final MsgEventType I14 = new MsgEventType(-3029, "I14", true, null, null, Color.Default);
	public static final MsgEventType M02 = new MsgEventType(-2950, "M02", true, null, null, Color.Default);
	public static final MsgEventType M04 = new MsgEventType(-3415, "M04", true, null, null, Color.Default);
	public static final MsgEventType M05 = new MsgEventType(-2951, "M05", true, null, null, Color.Default);
	public static final MsgEventType O02 = new MsgEventType(-2143, "O02", true, null, null, Color.Default);
	public static final MsgEventType O20 = new MsgEventType(-2142, "O20", true, null, null, Color.Default);
	public static final MsgEventType S12 = new MsgEventType(-2697, "S12", true, null, null, Color.Default);
	public static final MsgEventType S13 = new MsgEventType(-2832, "S13", true, null, null, Color.Default);
	public static final MsgEventType S14 = new MsgEventType(-2845, "S14", true, null, null, Color.Default);
	public static final MsgEventType S14UNARRIVE = new MsgEventType(-3007, "S14 Unarrive", true, null, null, Color.Default);
	public static final MsgEventType S15 = new MsgEventType(-2698, "S15", true, null, null, Color.Default);
	public static final MsgEventType S26 = new MsgEventType(-2699, "S26", true, null, null, Color.Default);
	public static final MsgEventType T02 = new MsgEventType(-2149, "T02", true, null, null, Color.Default);
	public static final MsgEventType UNKNOWN = new MsgEventType(-2896, "Unknown", true, null, null, Color.Default);
	public static final MsgEventType P01 = new MsgEventType(-3411, "P01", true, null, null, Color.Default);
	public static final MsgEventType P02 = new MsgEventType(-3412, "P02", true, null, null, Color.Default);
	public static final MsgEventType P03 = new MsgEventType(-3405, "P03", true, null, null, Color.Default);
	public static final MsgEventType P05 = new MsgEventType(-3413, "P05", true, null, null, Color.Default);
}
