
    
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 JobStatus extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_JobStatus = new JobStatusFactory();
    
    public static final JobStatus OPEN = new JobStatus ("OPEN", "OPEN", "Open", false);
    
    public static final JobStatus COMPLETE = new JobStatus ("COMPLETE", "COMPLETE", "Closed", false);
    
    public static final JobStatus DRAFT = new JobStatus ("DRAFT", "DRAFT", "Draft", false);
    
    public static final JobStatus FILLED = new JobStatus ("FILLED", "FILLED", "Filled", false);

    private static final JobStatus[] allJobStatuss =
        new JobStatus[] { OPEN,COMPLETE,DRAFT,FILLED};


    private static JobStatus[] getAllJobStatuss ()
    {
        return allJobStatuss;
    }

    private transient Integer ClientSortOrder;

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

    public Integer getClientSortOrder()
    {
    return ClientSortOrder;
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allJobStatuss);



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_JobStatus;
    }

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

        JobStatus[] all = getAllJobStatuss();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        JobStatus[] all = getAllJobStatuss();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllJobStatuss (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllJobStatuss());
    }
    
    
    public static JobStatus[] getJobStatusArray ()
    {
        return (JobStatus[])getAllJobStatuss().clone ();
    }


    public static void defineAdditionalData ()
    {
        OPEN.ClientSortOrder = 1;
        COMPLETE.ClientSortOrder = 2;
        DRAFT.ClientSortOrder = 4;
        FILLED.ClientSortOrder = 3;
        
    }


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

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

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


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

        attribs.put ("ClientSortOrder", ArrayFormatter.toObject(getClientSortOrder()));
        
        return attribs;
    }
}

