
    
package performa.orm.types;

import java.util.*;
import oneit.utils.*;



/**
 * This class was generated using constGen.bat.
 * DO NOT MODIFY THIS CODE.
 * Edit the associated .xml file, and regenerate this file
 * constGen (directory) (file minus extension)
 * e.g. constGen C:\...\sql FieldType
 */

public class AppFilter extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_AppFilter = new AppFilterFactory();
    
    public static final AppFilter REQ = new AppFilter ("REQ", "REQ", "Requirements", false);
    
    public static final AppFilter REQ_MET = new AppFilter ("REQ_MET", "REQ_MET", "Met", false);
    
    public static final AppFilter REQ_NOT_MET = new AppFilter ("REQ_NOT_MET", "REQ_NOT_MET", "Not Met", false);
    
    public static final AppFilter GENDER = new AppFilter ("GENDER", "GENDER", "Gender", false);
    
    public static final AppFilter GENDER_MAN = new AppFilter ("GENDER_MAN", "GENDER_MAN", "Man", false);
    
    public static final AppFilter GENDER_WOMAN = new AppFilter ("GENDER_WOMAN", "GENDER_WOMAN", "Woman", false);
    
    public static final AppFilter GENDER_OTHER = new AppFilter ("GENDER_OTHER", "GENDER_OTHER", "Other", false);
    
    public static final AppFilter ATSI = new AppFilter ("ATSI", "ATSI", "ATSI", false);
    
    public static final AppFilter ATSI_ABORIGINAL = new AppFilter ("ATSI_ABORIGINAL", "ATSI_ABORIGINAL", "Aboriginal", false);
    
    public static final AppFilter ATSI_TSI = new AppFilter ("ATSI_TSI", "ATSI_TSI", "Torres Strait Islander", false);
    
    public static final AppFilter ATSI_BOTH = new AppFilter ("ATSI_BOTH", "ATSI_BOTH", "Both", false);
    
    public static final AppFilter DISABLED = new AppFilter ("DISABLED", "DISABLED", "Disability", false);
    
    public static final AppFilter DISABLED_HEARING = new AppFilter ("DISABLED_HEARING", "DISABLED_HEARING", "Hearing", false);
    
    public static final AppFilter DISABLED_LEARNING = new AppFilter ("DISABLED_LEARNING", "DISABLED_LEARNING", "Learning", false);
    
    public static final AppFilter DISABLED_MEDICAL = new AppFilter ("DISABLED_MEDICAL", "DISABLED_MEDICAL", "Medical / Physical / Psychiatric", false);
    
    public static final AppFilter DISABLED_SIGHT = new AppFilter ("DISABLED_SIGHT", "DISABLED_SIGHT", "Sight", false);
    
    public static final AppFilter DISABLED_SPEECH = new AppFilter ("DISABLED_SPEECH", "DISABLED_SPEECH", "Speech", false);
    
    public static final AppFilter DISABLED_ARMS = new AppFilter ("DISABLED_ARMS", "DISABLED_ARMS", "Use of Arms and Hands", false);
    
    public static final AppFilter DISABLED_LEGS = new AppFilter ("DISABLED_LEGS", "DISABLED_LEGS", "Use of Legs", false);
    
    public static final AppFilter DISABLED_OTHER = new AppFilter ("DISABLED_OTHER", "DISABLED_OTHER", "Other", false);

    private static final AppFilter[] allAppFilters =
        new AppFilter[] { REQ,REQ_MET,REQ_NOT_MET,GENDER,GENDER_MAN,GENDER_WOMAN,GENDER_OTHER,ATSI,ATSI_ABORIGINAL,ATSI_TSI,ATSI_BOTH,DISABLED,DISABLED_HEARING,DISABLED_LEARNING,DISABLED_MEDICAL,DISABLED_SIGHT,DISABLED_SPEECH,DISABLED_ARMS,DISABLED_LEGS,DISABLED_OTHER};


    private static AppFilter[] getAllAppFilters ()
    {
        return allAppFilters;
    }

    private transient Boolean IsRoot;

    private transient AppFilter[] ChildNodes;

    private transient AppFilter ParentNode;

    private AppFilter (String name, String value, String description, boolean disabled)
    {
        super (name, value, description, disabled);
    }

    public Boolean getIsRoot()
    {
    return IsRoot;
    }

    public AppFilter[] getChildNodes()
    {
    return ChildNodes;
    }

    public AppFilter getParentNode()
    {
    return ParentNode;
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allAppFilters);



    static
    {
        defineAdditionalData ();
    }

    public boolean isEqual (AppFilter other)
    {
    return this.name.equals (other.name);
    }

    public Enumeration getAllInstances ()
    {
        return AppFilter.getAll ();
    }


    private Object readResolve() throws java.io.ObjectStreamException
    {
        return AppFilter.forName (this.name);
    }


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_AppFilter;
    }

    public static AppFilter forName (String name)
    {
        if (name == null) { return null; }

        AppFilter[] all = getAllAppFilters();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


    public static AppFilter forValue (String value)
    {
        if (value == null) { return null; }

        AppFilter[] all = getAllAppFilters();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllAppFilters (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllAppFilters());
    }
    
    
    public static AppFilter[] getAppFilterArray ()
    {
        return (AppFilter[])getAllAppFilters().clone ();
    }


    public static void defineAdditionalData ()
    {
        REQ.IsRoot = Boolean.TRUE;
        REQ.ChildNodes = new AppFilter[] {AppFilter.REQ_MET, AppFilter.REQ_NOT_MET};
        REQ_MET.IsRoot = Boolean.FALSE;
        REQ_MET.ChildNodes = new AppFilter[] {};
        REQ_MET.ParentNode = AppFilter.REQ;
        REQ_NOT_MET.IsRoot = Boolean.FALSE;
        REQ_NOT_MET.ChildNodes = new AppFilter[] {};
        REQ_NOT_MET.ParentNode = AppFilter.REQ;
        GENDER.IsRoot = Boolean.TRUE;
        GENDER.ChildNodes = new AppFilter[] {AppFilter.GENDER_MAN, AppFilter.GENDER_WOMAN, AppFilter.GENDER_OTHER};
        GENDER_MAN.IsRoot = Boolean.FALSE;
        GENDER_MAN.ChildNodes = new AppFilter[] {};
        GENDER_MAN.ParentNode = AppFilter.GENDER;
        GENDER_WOMAN.IsRoot = Boolean.FALSE;
        GENDER_WOMAN.ChildNodes = new AppFilter[] {};
        GENDER_WOMAN.ParentNode = AppFilter.GENDER;
        GENDER_OTHER.IsRoot = Boolean.FALSE;
        GENDER_OTHER.ChildNodes = new AppFilter[] {};
        GENDER_OTHER.ParentNode = AppFilter.GENDER;
        ATSI.IsRoot = Boolean.TRUE;
        ATSI.ChildNodes = new AppFilter[] {AppFilter.ATSI_ABORIGINAL, AppFilter.ATSI_TSI, AppFilter.ATSI_BOTH};
        ATSI_ABORIGINAL.IsRoot = Boolean.FALSE;
        ATSI_ABORIGINAL.ChildNodes = new AppFilter[] {};
        ATSI_ABORIGINAL.ParentNode = AppFilter.ATSI;
        ATSI_TSI.IsRoot = Boolean.FALSE;
        ATSI_TSI.ChildNodes = new AppFilter[] {};
        ATSI_TSI.ParentNode = AppFilter.ATSI;
        ATSI_BOTH.IsRoot = Boolean.FALSE;
        ATSI_BOTH.ChildNodes = new AppFilter[] {};
        ATSI_BOTH.ParentNode = AppFilter.ATSI;
        DISABLED.IsRoot = Boolean.TRUE;
        DISABLED.ChildNodes = new AppFilter[] {AppFilter.DISABLED_HEARING, AppFilter.DISABLED_LEARNING, AppFilter.DISABLED_MEDICAL, AppFilter.DISABLED_SIGHT, AppFilter.DISABLED_SPEECH , AppFilter.DISABLED_ARMS , AppFilter.DISABLED_LEGS , AppFilter.DISABLED_OTHER };
        DISABLED_HEARING.IsRoot = Boolean.FALSE;
        DISABLED_HEARING.ChildNodes = new AppFilter[] {};
        DISABLED_HEARING.ParentNode = AppFilter.DISABLED;
        DISABLED_LEARNING.IsRoot = Boolean.FALSE;
        DISABLED_LEARNING.ChildNodes = new AppFilter[] {};
        DISABLED_LEARNING.ParentNode = AppFilter.DISABLED;
        DISABLED_MEDICAL.IsRoot = Boolean.FALSE;
        DISABLED_MEDICAL.ChildNodes = new AppFilter[] {};
        DISABLED_MEDICAL.ParentNode = AppFilter.DISABLED;
        DISABLED_SIGHT.IsRoot = Boolean.FALSE;
        DISABLED_SIGHT.ChildNodes = new AppFilter[] {};
        DISABLED_SIGHT.ParentNode = AppFilter.DISABLED;
        DISABLED_SPEECH.IsRoot = Boolean.FALSE;
        DISABLED_SPEECH.ChildNodes = new AppFilter[] {};
        DISABLED_SPEECH.ParentNode = AppFilter.DISABLED;
        DISABLED_ARMS.IsRoot = Boolean.FALSE;
        DISABLED_ARMS.ChildNodes = new AppFilter[] {};
        DISABLED_ARMS.ParentNode = AppFilter.DISABLED;
        DISABLED_LEGS.IsRoot = Boolean.FALSE;
        DISABLED_LEGS.ChildNodes = new AppFilter[] {};
        DISABLED_LEGS.ParentNode = AppFilter.DISABLED;
        DISABLED_OTHER.IsRoot = Boolean.FALSE;
        DISABLED_OTHER.ChildNodes = new AppFilter[] {};
        DISABLED_OTHER.ParentNode = AppFilter.DISABLED;
        
    }


    static class AppFilterFactory implements EnumeratedFactory
    {
        public AbstractEnumerated getForName (String name)
        {
            return AppFilter.forName (name);
        }

        public AbstractEnumerated getForValue (String name)
        {
            return AppFilter.forValue (name);
        }

        public Enumeration getAll ()
        {
            return AppFilter.getAll ();
        }
    }


    public Map getAdditionalAttributes ()
    {
        Map attribs = new HashMap ();

        attribs.put ("IsRoot", ArrayFormatter.toObject(getIsRoot()));
        attribs.put ("ChildNodes", ArrayFormatter.toObject(getChildNodes()));
        attribs.put ("ParentNode", ArrayFormatter.toObject(getParentNode()));
        
        return attribs;
    }
}

