
    
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 StateType extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_StateType = new StateTypeFactory();
    
    public static final StateType WA = new StateType ("WA", "WA", "Western Australia", false);
    
    public static final StateType NSW = new StateType ("NSW", "NSW", "New South Wales", false);
    
    public static final StateType VIC = new StateType ("VIC", "VIC", "Victoria", false);
    
    public static final StateType TAS = new StateType ("TAS", "TAS", "Tasmania", false);
    
    public static final StateType QLD = new StateType ("QLD", "QLD", "Queensland", false);
    
    public static final StateType SA = new StateType ("SA", "SA", "South Australia", false);
    
    public static final StateType ACT = new StateType ("ACT", "ACT", "Australian Capital Territory", false);
    
    public static final StateType NT = new StateType ("NT", "NT", "Northern Territory", false);
    
    public static final StateType OS = new StateType ("OS", "OS", "Outside Australia", false);

    private static final StateType[] allStateTypes =
        new StateType[] { WA,NSW,VIC,TAS,QLD,SA,ACT,NT,OS};


    private static StateType[] getAllStateTypes ()
    {
        return allStateTypes;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_StateType;
    }

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

        StateType[] all = getAllStateTypes();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        StateType[] all = getAllStateTypes();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllStateTypes (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllStateTypes());
    }
    
    
    public static StateType[] getStateTypeArray ()
    {
        return (StateType[])getAllStateTypes().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

