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

	public DailyTimePeriods()
	{
		super();
	}
	public DailyTimePeriods(int id)
	{
		super(id, "", true);
	}
	public DailyTimePeriods(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public DailyTimePeriods(int id, String text, boolean active, DailyTimePeriods parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public DailyTimePeriods(int id, String text, boolean active, DailyTimePeriods parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public DailyTimePeriods(int id, String text, boolean active, DailyTimePeriods parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static DailyTimePeriods buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new DailyTimePeriods(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (DailyTimePeriods)super.getParentInstance();
	}
	public DailyTimePeriods getParent()
	{
		return (DailyTimePeriods)super.getParentInstance();
	}
	public void setParent(DailyTimePeriods parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		DailyTimePeriods[] typedChildren = new DailyTimePeriods[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (DailyTimePeriods)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof DailyTimePeriods)
		{
			super.addChild((DailyTimePeriods)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof DailyTimePeriods)
		{
			super.removeChild((DailyTimePeriods)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		DailyTimePeriodsCollection result = new DailyTimePeriodsCollection();
		result.add(HOUR0);
		result.add(HOUR1);
		result.add(HOUR2);
		result.add(HOUR3);
		result.add(HOUR4);
		result.add(HOUR5);
		result.add(HOUR6);
		result.add(HOUR7);
		result.add(HOUR8);
		result.add(HOUR9);
		result.add(HOUR10);
		result.add(HOUR11);
		result.add(HOUR12);
		result.add(HOUR13);
		result.add(HOUR14);
		result.add(HOUR15);
		result.add(HOUR16);
		result.add(HOUR17);
		result.add(HOUR18);
		result.add(HOUR19);
		result.add(HOUR20);
		result.add(HOUR21);
		result.add(HOUR22);
		result.add(HOUR23);
		return result;
	}
	public static DailyTimePeriods[] getNegativeInstances()
	{
		DailyTimePeriods[] instances = new DailyTimePeriods[24];
		instances[0] = HOUR0;
		instances[1] = HOUR1;
		instances[2] = HOUR2;
		instances[3] = HOUR3;
		instances[4] = HOUR4;
		instances[5] = HOUR5;
		instances[6] = HOUR6;
		instances[7] = HOUR7;
		instances[8] = HOUR8;
		instances[9] = HOUR9;
		instances[10] = HOUR10;
		instances[11] = HOUR11;
		instances[12] = HOUR12;
		instances[13] = HOUR13;
		instances[14] = HOUR14;
		instances[15] = HOUR15;
		instances[16] = HOUR16;
		instances[17] = HOUR17;
		instances[18] = HOUR18;
		instances[19] = HOUR19;
		instances[20] = HOUR20;
		instances[21] = HOUR21;
		instances[22] = HOUR22;
		instances[23] = HOUR23;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[24];
		negativeInstances[0] = "HOUR0";
		negativeInstances[1] = "HOUR1";
		negativeInstances[2] = "HOUR2";
		negativeInstances[3] = "HOUR3";
		negativeInstances[4] = "HOUR4";
		negativeInstances[5] = "HOUR5";
		negativeInstances[6] = "HOUR6";
		negativeInstances[7] = "HOUR7";
		negativeInstances[8] = "HOUR8";
		negativeInstances[9] = "HOUR9";
		negativeInstances[10] = "HOUR10";
		negativeInstances[11] = "HOUR11";
		negativeInstances[12] = "HOUR12";
		negativeInstances[13] = "HOUR13";
		negativeInstances[14] = "HOUR14";
		negativeInstances[15] = "HOUR15";
		negativeInstances[16] = "HOUR16";
		negativeInstances[17] = "HOUR17";
		negativeInstances[18] = "HOUR18";
		negativeInstances[19] = "HOUR19";
		negativeInstances[20] = "HOUR20";
		negativeInstances[21] = "HOUR21";
		negativeInstances[22] = "HOUR22";
		negativeInstances[23] = "HOUR23";
		return negativeInstances;
	}
	public static DailyTimePeriods 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 DailyTimePeriods getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		DailyTimePeriods[] 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 = 1021180;
	public static final DailyTimePeriods HOUR0 = new DailyTimePeriods(-1003, "HOUR0", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR1 = new DailyTimePeriods(-1004, "HOUR1", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR2 = new DailyTimePeriods(-1005, "HOUR2", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR3 = new DailyTimePeriods(-1007, "HOUR3", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR4 = new DailyTimePeriods(-1008, "HOUR4", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR5 = new DailyTimePeriods(-1009, "HOUR5", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR6 = new DailyTimePeriods(-1010, "HOUR6", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR7 = new DailyTimePeriods(-1011, "HOUR7", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR8 = new DailyTimePeriods(-1012, "HOUR8", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR9 = new DailyTimePeriods(-1013, "HOUR9", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR10 = new DailyTimePeriods(-1014, "HOUR10", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR11 = new DailyTimePeriods(-1015, "HOUR11", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR12 = new DailyTimePeriods(-1016, "HOUR12", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR13 = new DailyTimePeriods(-1017, "HOUR13", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR14 = new DailyTimePeriods(-1018, "HOUR14", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR15 = new DailyTimePeriods(-1019, "HOUR15", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR16 = new DailyTimePeriods(-1020, "HOUR16", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR17 = new DailyTimePeriods(-1021, "HOUR17", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR18 = new DailyTimePeriods(-1022, "HOUR18", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR19 = new DailyTimePeriods(-1023, "HOUR19", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR20 = new DailyTimePeriods(-1024, "HOUR20", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR21 = new DailyTimePeriods(-1037, "HOUR21", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR22 = new DailyTimePeriods(-1025, "HOUR22", true, null, null, Color.Default);
	public static final DailyTimePeriods HOUR23 = new DailyTimePeriods(-1026, "HOUR23", true, null, null, Color.Default);
}
