
    
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 ApplicationStatus extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_ApplicationStatus = new ApplicationStatusFactory();
    
    public static final ApplicationStatus POST_INGEST = new ApplicationStatus ("POST_INGEST", "POST_INGEST", "Post Ingest", false);
    
    public static final ApplicationStatus DRAFT = new ApplicationStatus ("DRAFT", "DRAFT", "Incomplete", false);
    
    public static final ApplicationStatus SUBMITTED = new ApplicationStatus ("SUBMITTED", "SUBMITTED", "Applicant", false);
    
    public static final ApplicationStatus SHORTLISTED = new ApplicationStatus ("SHORTLISTED", "SHORTLISTED", "Shortlisted", false);
    
    public static final ApplicationStatus STATUS_4 = new ApplicationStatus ("STATUS_4", "STATUS_4", "", false);
    
    public static final ApplicationStatus STATUS_5 = new ApplicationStatus ("STATUS_5", "STATUS_5", "", false);
    
    public static final ApplicationStatus STATUS_6 = new ApplicationStatus ("STATUS_6", "STATUS_6", "", false);
    
    public static final ApplicationStatus STATUS_7 = new ApplicationStatus ("STATUS_7", "STATUS_7", "", false);
    
    public static final ApplicationStatus STATUS_8 = new ApplicationStatus ("STATUS_8", "STATUS_8", "", false);
    
    public static final ApplicationStatus UNSUITABLE = new ApplicationStatus ("UNSUITABLE", "UNSUITABLE", "Unsuitable", false);

    private static final ApplicationStatus[] allApplicationStatuss =
        new ApplicationStatus[] { POST_INGEST,DRAFT,SUBMITTED,SHORTLISTED,STATUS_4,STATUS_5,STATUS_6,STATUS_7,STATUS_8,UNSUITABLE};


    private static ApplicationStatus[] getAllApplicationStatuss ()
    {
        return allApplicationStatuss;
    }

    private transient Integer SortOrder;

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

    public Integer getSortOrder()
    {
    return SortOrder;
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allApplicationStatuss);



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_ApplicationStatus;
    }

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

        ApplicationStatus[] all = getAllApplicationStatuss();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        ApplicationStatus[] all = getAllApplicationStatuss();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllApplicationStatuss (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllApplicationStatuss());
    }
    
    
    public static ApplicationStatus[] getApplicationStatusArray ()
    {
        return (ApplicationStatus[])getAllApplicationStatuss().clone ();
    }


    public static void defineAdditionalData ()
    {
        POST_INGEST.SortOrder = 0;
        DRAFT.SortOrder = 1;
        SUBMITTED.SortOrder = 2;
        SHORTLISTED.SortOrder = 3;
        STATUS_4.SortOrder = 4;
        STATUS_5.SortOrder = 5;
        STATUS_6.SortOrder = 6;
        STATUS_7.SortOrder = 7;
        STATUS_8.SortOrder = 8;
        UNSUITABLE.SortOrder = 9;
        
    }


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

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

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


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

        attribs.put ("SortOrder", ArrayFormatter.toObject(getSortOrder()));
        
        return attribs;
    }
}

