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

	public ApplicationSiteName()
	{
		super();
	}
	public ApplicationSiteName(int id)
	{
		super(id, "", true);
	}
	public ApplicationSiteName(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public ApplicationSiteName(int id, String text, boolean active, ApplicationSiteName parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public ApplicationSiteName(int id, String text, boolean active, ApplicationSiteName parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public ApplicationSiteName(int id, String text, boolean active, ApplicationSiteName parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static ApplicationSiteName buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new ApplicationSiteName(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (ApplicationSiteName)super.getParentInstance();
	}
	public ApplicationSiteName getParent()
	{
		return (ApplicationSiteName)super.getParentInstance();
	}
	public void setParent(ApplicationSiteName parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		ApplicationSiteName[] typedChildren = new ApplicationSiteName[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (ApplicationSiteName)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof ApplicationSiteName)
		{
			super.addChild((ApplicationSiteName)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof ApplicationSiteName)
		{
			super.removeChild((ApplicationSiteName)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		ApplicationSiteNameCollection result = new ApplicationSiteNameCollection();
		result.add(BHRT);
		result.add(BLACKPOOL);
		result.add(RefMan);
		result.add(CCO);
		result.add(CMHT);
		result.add(COE);
		result.add(GHG);
		result.add(NAES);
		result.add(NTPF);
		result.add(HSE_MIDLEINSTER);
		result.add(HSE_SOUTH);
		result.add(RCHT);
		result.add(SALES);
		result.add(STEES);
		result.add(TURNINGPOINT);
		result.add(LEOPARDSTOWN);
		result.add(UKSH);
		result.add(SI);
		result.add(PTC);
		result.add(STHK);
		result.add(GOSH);
		result.add(SPA_MEDICA);
		result.add(SE_TRUST);
		result.add(AML);
		result.add(SPIRE);
		result.add(CANCER_CARE);
		result.add(SVUH);
		return result;
	}
	public static ApplicationSiteName[] getNegativeInstances()
	{
		ApplicationSiteName[] instances = new ApplicationSiteName[27];
		instances[0] = BHRT;
		instances[1] = BLACKPOOL;
		instances[2] = RefMan;
		instances[3] = CCO;
		instances[4] = CMHT;
		instances[5] = COE;
		instances[6] = GHG;
		instances[7] = NAES;
		instances[8] = NTPF;
		instances[9] = HSE_MIDLEINSTER;
		instances[10] = HSE_SOUTH;
		instances[11] = RCHT;
		instances[12] = SALES;
		instances[13] = STEES;
		instances[14] = TURNINGPOINT;
		instances[15] = LEOPARDSTOWN;
		instances[16] = UKSH;
		instances[17] = SI;
		instances[18] = PTC;
		instances[19] = STHK;
		instances[20] = GOSH;
		instances[21] = SPA_MEDICA;
		instances[22] = SE_TRUST;
		instances[23] = AML;
		instances[24] = SPIRE;
		instances[25] = CANCER_CARE;
		instances[26] = SVUH;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[27];
		negativeInstances[0] = "BHRT";
		negativeInstances[1] = "BLACKPOOL";
		negativeInstances[2] = "RefMan";
		negativeInstances[3] = "CCO";
		negativeInstances[4] = "CMHT";
		negativeInstances[5] = "COE";
		negativeInstances[6] = "GHG";
		negativeInstances[7] = "NAES";
		negativeInstances[8] = "NTPF";
		negativeInstances[9] = "HSE_MIDLEINSTER";
		negativeInstances[10] = "HSE_SOUTH";
		negativeInstances[11] = "RCHT";
		negativeInstances[12] = "SALES";
		negativeInstances[13] = "STEES";
		negativeInstances[14] = "TURNINGPOINT";
		negativeInstances[15] = "LEOPARDSTOWN";
		negativeInstances[16] = "UKSH";
		negativeInstances[17] = "SI";
		negativeInstances[18] = "PTC";
		negativeInstances[19] = "STHK";
		negativeInstances[20] = "GOSH";
		negativeInstances[21] = "SPA_MEDICA";
		negativeInstances[22] = "SE_TRUST";
		negativeInstances[23] = "AML";
		negativeInstances[24] = "SPIRE";
		negativeInstances[25] = "CANCER_CARE";
		negativeInstances[26] = "SVUH";
		return negativeInstances;
	}
	public static ApplicationSiteName 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 ApplicationSiteName getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		ApplicationSiteName[] 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 = 1021238;
	public static final ApplicationSiteName BHRT = new ApplicationSiteName(-1680, "BHRT", true, null, null, Color.Default);
	public static final ApplicationSiteName BLACKPOOL = new ApplicationSiteName(-1681, "Blackpool", true, null, null, Color.Default);
	public static final ApplicationSiteName RefMan = new ApplicationSiteName(-1682, "RefMan", true, null, null, Color.Default);
	public static final ApplicationSiteName CCO = new ApplicationSiteName(-1683, "CCO", true, null, null, Color.Default);
	public static final ApplicationSiteName CMHT = new ApplicationSiteName(-1684, "CMHT", true, null, null, Color.Default);
	public static final ApplicationSiteName COE = new ApplicationSiteName(-1685, "COE", true, null, null, Color.Default);
	public static final ApplicationSiteName GHG = new ApplicationSiteName(-1686, "GHG", true, null, null, Color.Default);
	public static final ApplicationSiteName NAES = new ApplicationSiteName(-1687, "NAES", true, null, null, Color.Default);
	public static final ApplicationSiteName NTPF = new ApplicationSiteName(-1688, "NTPF", true, null, null, Color.Default);
	public static final ApplicationSiteName HSE_MIDLEINSTER = new ApplicationSiteName(-1689, "HSE Mid Leinster", true, null, null, Color.Default);
	public static final ApplicationSiteName HSE_SOUTH = new ApplicationSiteName(-1690, "HSE South", true, null, null, Color.Default);
	public static final ApplicationSiteName RCHT = new ApplicationSiteName(-1691, "RCHT", true, null, null, Color.Default);
	public static final ApplicationSiteName SALES = new ApplicationSiteName(-1692, "Sales", true, null, null, Color.Default);
	public static final ApplicationSiteName STEES = new ApplicationSiteName(-1693, "STEES", true, null, null, Color.Default);
	public static final ApplicationSiteName TURNINGPOINT = new ApplicationSiteName(-1694, "Turning Point", true, null, null, Color.Default);
	public static final ApplicationSiteName LEOPARDSTOWN = new ApplicationSiteName(-1799, "LEOPARDSTOWN", true, null, null, Color.Default);
	public static final ApplicationSiteName UKSH = new ApplicationSiteName(-1838, "UKSH", true, null, null, Color.Default);
	public static final ApplicationSiteName SI = new ApplicationSiteName(-1892, "SI", true, null, null, Color.Default);
	public static final ApplicationSiteName PTC = new ApplicationSiteName(-2026, "Peninsula Treatment Centre", true, null, null, Color.Default);
	public static final ApplicationSiteName STHK = new ApplicationSiteName(-2051, "STHK", true, null, null, Color.Default);
	public static final ApplicationSiteName GOSH = new ApplicationSiteName(-2052, "GOSH", true, null, null, Color.Default);
	public static final ApplicationSiteName SPA_MEDICA = new ApplicationSiteName(-2132, "SpaMedica", true, null, null, Color.Default);
	public static final ApplicationSiteName SE_TRUST = new ApplicationSiteName(-2138, "South East Trust", true, null, null, Color.Default);
	public static final ApplicationSiteName AML = new ApplicationSiteName(-2139, "AML", true, null, null, Color.Default);
	public static final ApplicationSiteName SPIRE = new ApplicationSiteName(-2163, "SPIRE", true, null, null, Color.Default);
	public static final ApplicationSiteName CANCER_CARE = new ApplicationSiteName(-2401, "Cancer Care", true, null, null, Color.Default);
	public static final ApplicationSiteName SVUH = new ApplicationSiteName(-2792, "SVUH", true, null, null, Color.Default);
}
