
    
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 CompanyStatus extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_CompanyStatus = new CompanyStatusFactory();
    
    public static final CompanyStatus ACTIVE = new CompanyStatus ("ACTIVE", "ACTIVE", "Active", false);
    
    public static final CompanyStatus CANCELLED = new CompanyStatus ("CANCELLED", "CANCELLED", "Cancelled", false);
    
    public static final CompanyStatus CLOSED = new CompanyStatus ("CLOSED", "CLOSED", "Closed", false);

    private static final CompanyStatus[] allCompanyStatuss =
        new CompanyStatus[] { ACTIVE,CANCELLED,CLOSED};


    private static CompanyStatus[] getAllCompanyStatuss ()
    {
        return allCompanyStatuss;
    }

    private CompanyStatus (String name, String value, String description, boolean disabled)
    {
        super (name, value, description, disabled);
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allCompanyStatuss);



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_CompanyStatus;
    }

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

        CompanyStatus[] all = getAllCompanyStatuss();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        CompanyStatus[] all = getAllCompanyStatuss();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllCompanyStatuss (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllCompanyStatuss());
    }
    
    
    public static CompanyStatus[] getCompanyStatusArray ()
    {
        return (CompanyStatus[])getAllCompanyStatuss().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

