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

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


    private static State[] getAllStates ()
    {
        return allStates;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_State;
    }

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

        State[] all = getAllStates();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        State[] all = getAllStates();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllStates (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllStates());
    }
    
    
    public static State[] getStateArray ()
    {
        return (State[])getAllStates().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

